There is no need for these conditions anymore.
authorCryptoManiac <balthazar@yandex.ru>
Mon, 21 Mar 2016 18:08:56 +0000 (21:08 +0300)
committerCryptoManiac <balthazar@yandex.ru>
Mon, 21 Mar 2016 18:08:56 +0000 (21:08 +0300)
src/init.cpp
src/rpcwallet.cpp
src/script.cpp
src/timestamps.h

index 8fab885..994c784 100644 (file)
@@ -903,14 +903,12 @@ bool AppInit2()
         if (!pwalletMain->SetAddressBookName(pwalletMain->vchDefaultKey.GetID(), ""))
             strErrors << _("Cannot write default address") << "\n";
 
-        if (fTestNet || GetTime() < SMALLDATA_SWITCH_TIME) {
-            CMalleableKeyView keyView = pwalletMain->GenerateNewMalleableKey();
-            CMalleableKey mKey;
-            if (!pwalletMain->GetMalleableKey(keyView, mKey))
-                strErrors << _("Unable to generate new malleable key");
-            if (!pwalletMain->SetAddressBookName(CBitcoinAddress(keyView.GetMalleablePubKey()), ""))
-                strErrors << _("Cannot write default address") << "\n";
-        }
+        CMalleableKeyView keyView = pwalletMain->GenerateNewMalleableKey();
+        CMalleableKey mKey;
+        if (!pwalletMain->GetMalleableKey(keyView, mKey))
+            strErrors << _("Unable to generate new malleable key");
+        if (!pwalletMain->SetAddressBookName(CBitcoinAddress(keyView.GetMalleablePubKey()), ""))
+            strErrors << _("Cannot write default address") << "\n";
     }
 
     printf("%s", strErrors.str().c_str());
index 8c36836..5ff8320 100644 (file)
@@ -1898,9 +1898,6 @@ Value newmalleablekey(const Array& params, bool fHelp)
             "newmalleablekey\n"
             "Make a malleable public/private key pair.\n");
 
-    if (!(fDebug || fTestNet) && GetTime() < SMALLDATA_SWITCH_TIME)
-        throw runtime_error("This feature has been disabled for mainNet clients");
-
     // Parse the account first so we don't generate a key if there's an error
     string strAccount;
     if (params.size() > 0)
index 1b82de4..0f31de1 100644 (file)
@@ -1333,11 +1333,8 @@ bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, vector<vector<unsi
         // Standard tx, sender provides pubkey, receiver adds signature
         mTemplates.insert(make_pair(TX_PUBKEY, CScript() << OP_PUBKEY << OP_CHECKSIG));
 
-        if (fTestNet || GetTime() > SMALLDATA_SWITCH_TIME)
-        {
-            // Malleable pubkey tx hack, sender provides generated pubkey combined with R parameter. The R parameter is dropped before checking a signature.
-            mTemplates.insert(make_pair(TX_PUBKEY_DROP, CScript() << OP_PUBKEY << OP_PUBKEY << OP_DROP << OP_CHECKSIG));
-        }
+        // Malleable pubkey tx hack, sender provides generated pubkey combined with R parameter. The R parameter is dropped before checking a signature.
+        mTemplates.insert(make_pair(TX_PUBKEY_DROP, CScript() << OP_PUBKEY << OP_PUBKEY << OP_DROP << 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));
@@ -1460,7 +1457,7 @@ bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, vector<vector<unsi
             else if (opcode2 == OP_SMALLDATA)
             {
                 // small pushdata, <= 1024 bytes
-                if (vch1.size() > (GetTime() > SMALLDATA_SWITCH_TIME ? 1024 : 80))
+                if (vch1.size() > 1024)
                     break;
             }
             else if (opcode1 != opcode2 || vch1 != vch2)
index bc4b950..57382bd 100644 (file)
@@ -2,6 +2,5 @@
 #define BITCOIN_TIMESTAMPS_H
 
 static const unsigned int TARGETS_SWITCH_TIME = 1374278400; // Saturday, 20-Jul-2013 00:00:00 UTC
-static const unsigned int SMALLDATA_SWITCH_TIME = 1458432000; // Sunday, 20-Mar-16 00:00:00 UTC
 static const unsigned int CHECKLOCKTIMEVERIFY_SWITCH_TIME = 1461110400; // Wednesday, 20-Apr-16 00:00:00 UTC
 #endif