Litecoin: Reset testnet (now testnet4)

pull/292/head
Adrian Gallagher 8 years ago
parent e7fc99a0c7
commit 2e0f83d0a2

@ -43,7 +43,7 @@ config file):
HiddenServiceDir /var/lib/tor/bitcoin-service/
HiddenServicePort 9333 127.0.0.1:9333
HiddenServicePort 19333 127.0.0.1:19333
HiddenServicePort 19335 127.0.0.1:19335
The directory can be different of course, but (both) port numbers should be equal to
your bitcoind's P2P listen port (9333 by default).

@ -127,7 +127,7 @@ def main():
process_nodes(g, f, 'pnSeed6_main', 9333)
g.write('\n')
with open(os.path.join(indir,'nodes_test.txt'),'r') as f:
process_nodes(g, f, 'pnSeed6_test', 19333)
process_nodes(g, f, 'pnSeed6_test', 19335)
g.write('#endif // BITCOIN_CHAINPARAMSSEEDS_H\n')
if __name__ == '__main__':

@ -1,4 +1,4 @@
# List of fixed seed nodes for testnet
162.243.72.166:19333
107.191.58.84:19333
104.236.211.206
66.178.182.35

@ -81,12 +81,12 @@ static const Checkpoints::CCheckpointData data = {
static Checkpoints::MapCheckpoints mapCheckpointsTestnet =
boost::assign::map_list_of
( 546, uint256("0xa0fea99a6897f531600c8ae53367b126824fd6a847b2b2b73817a95b8e27e602"))
( 2056, uint256("0x17748a31ba97afdc9a4f86837a39d287e3e7c7290a08a1d816c5969c78a83289"))
;
static const Checkpoints::CCheckpointData dataTestnet = {
&mapCheckpointsTestnet,
1365458829,
547,
1487715270,
8731,
576
};
@ -199,12 +199,12 @@ public:
CTestNetParams() {
networkID = CBaseChainParams::TESTNET;
strNetworkID = "test";
pchMessageStart[0] = 0xfc;
pchMessageStart[1] = 0xc1;
pchMessageStart[2] = 0xb7;
pchMessageStart[3] = 0xdc;
pchMessageStart[0] = 0xfd;
pchMessageStart[1] = 0xd2;
pchMessageStart[2] = 0xc8;
pchMessageStart[3] = 0xf1;
vAlertPubKey = ParseHex("0449623fc74489a947c4b15d579115591add020e53b3490bf47297dfa3762250625f8ecc2fb4fc59f69bdce8f7080f3167808276ed2c79d297054367566038aa82");
nDefaultPort = 19333;
nDefaultPort = 19335;
nEnforceBlockUpgradeMajority = 51;
nRejectBlockOutdatedMajority = 75;
nToCheckBlockUpgradeMajority = 100;
@ -214,16 +214,15 @@ public:
nMaxTipAge = 0x7fffffff;
//! Modify the testnet genesis block so the timestamp is valid for a later start.
genesis.nTime = 1317798646;
genesis.nNonce = 385270584;
genesis.nTime = 1486949366;
genesis.nNonce = 293345;
hashGenesisBlock = genesis.GetHash();
assert(hashGenesisBlock == uint256("0xf5ae71e26c74beacc88382716aced69cddf3dffff24f384e1808905e0188f68f"));
assert(hashGenesisBlock == uint256("0x4966625a4b2851d9fdee139e56211a0d88575f59ed816ff5e6a63deb4e3e29a0"));
vFixedSeeds.clear();
vSeeds.clear();
vSeeds.push_back(CDNSSeedData("litecointools.com", "testnet-seed.litecointools.com"));
vSeeds.push_back(CDNSSeedData("xurious.com", "testnet-seed.ltc.xurious.com"));
vSeeds.push_back(CDNSSeedData("wemine-testnet.com", "dnsseed.wemine-testnet.com"));
vSeeds.push_back(CDNSSeedData("loshan.co.uk", "seed-b.litecoin.loshan.co.uk"));
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,111);
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);
@ -241,8 +240,8 @@ public:
fMineBlocksOnDemand = false;
fTestnetToBeDeprecatedFieldRPC = true;
// Litecoin: Testnet v2 enforced as of block 400k
nEnforceV2AfterHeight = 400000;
// Litecoin: v2 enforced using Bitcoin's supermajority rule
nEnforceV2AfterHeight = -1;
}
const Checkpoints::CCheckpointData& Checkpoints() const
{

@ -37,7 +37,7 @@ public:
{
networkID = CBaseChainParams::TESTNET;
nRPCPort = 19332;
strDataDir = "testnet3";
strDataDir = "testnet4";
}
};
static CBaseTestNetParams testNetParams;

@ -284,7 +284,7 @@ std::string HelpMessage(HelpMessageMode mode)
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 " + strprintf(_("Relay non-P2SH multisig (default: %u)"), 1) + "\n";
strUsage += " -port=<port> " + strprintf(_("Listen for connections on <port> (default: %u or testnet: %u)"), 9333, 19333) + "\n";
strUsage += " -port=<port> " + strprintf(_("Listen for connections on <port> (default: %u or testnet: %u)"), 9333, 19335) + "\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";

@ -2552,19 +2552,19 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta
if (pcheckpoint && nHeight < pcheckpoint->nHeight)
return state.DoS(100, error("%s : forked chain older than last checkpoint (height %d)", __func__, nHeight));
// Litecoin: Reject block.nVersion=1 blocks (mainnet >= 710000, testnet >= 400000, regtest uses supermajority)
// Litecoin: Reject block.nVersion=1 blocks (mainnet >= 710000, testnet & regtest uses supermajority)
bool enforceV2 = false;
if (block.nVersion < 2)
{
if (Params().EnforceV2AfterHeight() != -1)
{
// Mainnet 710k, Testnet 400k
// Mainnet 710k
if (nHeight >= Params().EnforceV2AfterHeight())
enforceV2 = true;
}
else
{
// Regtest and Unittest: use Bitcoin's supermajority rule
// Testnet, Regtest and Unittest: use Bitcoin's supermajority rule
if (CBlockIndex::IsSuperMajority(2, pindexPrev, Params().RejectBlockOutdatedMajority()))
enforceV2 = true;
}

Loading…
Cancel
Save