Remove -bip16 and -paytoscripthashtime command-line arguments
This commit is contained in:
parent
2e2c04e250
commit
8f188ece3c
2 changed files with 8 additions and 24 deletions
19
src/init.cpp
19
src/init.cpp
|
@ -489,24 +489,11 @@ bool AppInit2(int argc, char* argv[])
|
||||||
fAllowDNS = GetBoolArg("-dns");
|
fAllowDNS = GetBoolArg("-dns");
|
||||||
fNoListen = !GetBoolArg("-listen", true);
|
fNoListen = !GetBoolArg("-listen", true);
|
||||||
|
|
||||||
// This code can be removed once a super-majority of the network has upgraded.
|
// Continue to put "/P2SH/" in the coinbase to monitor
|
||||||
if (GetBoolArg("-bip16", true))
|
// BIP16 support.
|
||||||
{
|
// This can be removed eventually...
|
||||||
if (fTestNet)
|
|
||||||
SoftSetArg("-paytoscripthashtime", "1329264000"); // Feb 15
|
|
||||||
else
|
|
||||||
SoftSetArg("-paytoscripthashtime", "1333238400"); // April 1 2012
|
|
||||||
|
|
||||||
// Put "/P2SH/" in the coinbase so everybody can tell when
|
|
||||||
// a majority of miners support it
|
|
||||||
const char* pszP2SH = "/P2SH/";
|
const char* pszP2SH = "/P2SH/";
|
||||||
COINBASE_FLAGS << std::vector<unsigned char>(pszP2SH, pszP2SH+strlen(pszP2SH));
|
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));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!fNoListen)
|
if (!fNoListen)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1278,12 +1278,9 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// To avoid being on the short end of a block-chain split,
|
// BIP16 didn't become active until Apr 1 2012 (Feb 15 on testnet)
|
||||||
// don't do secondary validation of pay-to-script-hash transactions
|
int64 nBIP16SwitchTime = fTestNet ? 1329264000 : 1333238400;
|
||||||
// until blocks with timestamps after paytoscripthashtime (see init.cpp for default).
|
bool fStrictPayToScriptHash = (pindex->nTime >= nBIP16SwitchTime);
|
||||||
// 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
|
//// issue here: it doesn't know the version
|
||||||
unsigned int nTxPos = pindex->nBlockPos + ::GetSerializeSize(CBlock(), SER_DISK) - 1 + GetSizeOfCompactSize(vtx.size());
|
unsigned int nTxPos = pindex->nBlockPos + ::GetSerializeSize(CBlock(), SER_DISK) - 1 + GetSizeOfCompactSize(vtx.size());
|
||||||
|
|
Loading…
Reference in a new issue