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());
"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)
// 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));
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)
#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