bool fTor = (fUseProxy && addrProxy.GetPort() == 9050);
if (fTor)
{
- // Use SoftSetArg here so user can override any of these if they wish.
+ // Use SoftSetBoolArg here so user can override any of these if they wish.
// Note: the GetBoolArg() calls for all of these must happen later.
- SoftSetArg("-nolisten", true);
- SoftSetArg("-noirc", true);
- SoftSetArg("-nodnsseed", true);
- SoftSetArg("-noupnp", true);
- SoftSetArg("-upnp", false);
- SoftSetArg("-dns", false);
+ SoftSetBoolArg("-nolisten", true);
+ SoftSetBoolArg("-noirc", true);
+ SoftSetBoolArg("-nodnsseed", true);
+ SoftSetBoolArg("-noupnp", true);
+ SoftSetBoolArg("-upnp", false);
+ SoftSetBoolArg("-dns", false);
}
fAllowDNS = GetBoolArg("-dns");
fNoListen = GetBoolArg("-nolisten");
+ // This code can be removed once a super-majority of the network has upgraded.
+ if (GetBoolArg("-bip16", true))
+ {
+ if (fTestNet)
+ SoftSetArg("-paytoscripthashtime", "1329264000"); // Feb 15
+ else
+ SoftSetArg("-paytoscripthashtime", "1330578000"); // Mar 1
+
+ // Put "/P2SH/" in the coinbase so everybody can tell when
+ // a majority of miners support it
+ const char* pszP2SH = "/P2SH/";
+ COINBASE_FLAGS << std::vector<unsigned char>(pszP2SH, pszP2SH+strlen(pszP2SH));
+ }
+ else
+ {
+ const char* pszP2SH = "NOP2SH";
+ COINBASE_FLAGS << std::vector<unsigned char>(pszP2SH, pszP2SH+strlen(pszP2SH));
+ }
+
// Command-line args override in-wallet settings:
if (mapArgs.count("-upnp"))
fUseUPnP = GetBoolArg("-upnp");
map<uint256, CDataStream*> mapOrphanTransactions;
multimap<uint256, CDataStream*> mapOrphanTransactionsByPrev;
+// Constant stuff for coinbase transactions we create:
+CScript COINBASE_FLAGS;
const string strMessageMagic = "Bitcoin Signed Message:\n";
// To avoid being on the short end of a block-chain split,
// don't do secondary validation of pay-to-script-hash transactions
- // until blocks with timestamps after paytoscripthashtime:
- int64 nEvalSwitchTime = GetArg("-paytoscripthashtime", 1329264000); // Feb 15, 2012
+ // until blocks with timestamps after paytoscripthashtime (see init.cpp for default).
+ // This code can be removed once a super-majority of the network has upgraded.
+ int64 nEvalSwitchTime = GetArg("-paytoscripthashtime", std::numeric_limits<int64_t>::max());
bool fStrictPayToScriptHash = (pindex->nTime >= nEvalSwitchTime);
//// issue here: it doesn't know the version