mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-09-12 15:02:32 +00:00
Merge pull request #285 from thrasher-/master
Litecoin: Reset testnet (now testnet4)
This commit is contained in:
commit
068de5d4cc
@ -4,7 +4,7 @@ rpcuser=someuser
|
||||
rpcpassword=somepassword
|
||||
host=127.0.0.1
|
||||
port=9332
|
||||
#port=19332
|
||||
#port=19334
|
||||
|
||||
# bootstrap.dat hashlist settings (linearize-hashes)
|
||||
max_height=313000
|
||||
|
@ -338,8 +338,8 @@ for selinuxvariant in %{selinux_variants}; do
|
||||
done
|
||||
%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 9332
|
||||
%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 9333
|
||||
%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 19332
|
||||
%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 19333
|
||||
%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 19334
|
||||
%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 19335
|
||||
%{_sbindir}/fixfiles -R bitcoin-server restore &> /dev/null || :
|
||||
%{_sbindir}/restorecon -R %{_localstatedir}/lib/bitcoin || :
|
||||
fi
|
||||
@ -357,8 +357,8 @@ if [ $1 -eq 0 ]; then
|
||||
if [ `%{_sbindir}/sestatus |grep -c "disabled"` -eq 0 ]; then
|
||||
%{_sbindir}/semanage port -d -p tcp 9332
|
||||
%{_sbindir}/semanage port -d -p tcp 9333
|
||||
%{_sbindir}/semanage port -d -p tcp 19332
|
||||
%{_sbindir}/semanage port -d -p tcp 19333
|
||||
%{_sbindir}/semanage port -d -p tcp 19334
|
||||
%{_sbindir}/semanage port -d -p tcp 19335
|
||||
for selinuxvariant in %{selinux_variants}; do
|
||||
%{_sbindir}/semodule -s ${selinuxvariant} -r bitcoin &> /dev/null || :
|
||||
done
|
||||
|
@ -130,7 +130,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,11 +1,4 @@
|
||||
# List of fixed seed nodes for testnet
|
||||
|
||||
162.243.72.166:19333
|
||||
107.191.58.84:19333
|
||||
188.122.92.132:19333
|
||||
198.245.63.172:19333
|
||||
37.97.208.110:19333
|
||||
23.22.129.139:19333
|
||||
46.105.124.86:19333
|
||||
101.201.42.49:19333
|
||||
176.9.113.75:19333
|
||||
104.236.211.206
|
||||
66.178.182.35
|
@ -70,7 +70,7 @@ def connect_JSON(config):
|
||||
testnet = config.get('testnet', '0')
|
||||
testnet = (int(testnet) > 0) # 0/1 in config file, convert to True/False
|
||||
if not 'rpcport' in config:
|
||||
config['rpcport'] = 19332 if testnet else 9332
|
||||
config['rpcport'] = 19334 if testnet else 9332
|
||||
connect = "http://%s:%s@127.0.0.1:%s"%(config['rpcuser'], config['rpcpassword'], config['rpcport'])
|
||||
try:
|
||||
result = ServiceProxy(connect)
|
||||
|
@ -53,7 +53,7 @@ https://github.com/bitcoin/bips/blob/master/bip-0064.mediawiki
|
||||
|
||||
Example:
|
||||
```
|
||||
$ curl localhost:19332/rest/getutxos/checkmempool/b2cdfd7b89def827ff8af7cd9bff7627ff72e5e8b0f71210f92ea7a4000c5d75-0.json 2>/dev/null | json_pp
|
||||
$ curl localhost:19334/rest/getutxos/checkmempool/b2cdfd7b89def827ff8af7cd9bff7627ff72e5e8b0f71210f92ea7a4000c5d75-0.json 2>/dev/null | json_pp
|
||||
{
|
||||
"chaintipHash" : "00000000fb01a7f3745a717f8caebee056c484e6e0bfe4a9591c235bb70506fb",
|
||||
"chainHeight" : 325347,
|
||||
|
@ -361,9 +361,9 @@ arbitrary TCP connections inside SSL. On e.g. Ubuntu it can be installed with:
|
||||
|
||||
sudo apt-get install stunnel4
|
||||
|
||||
Then, to tunnel a SSL connection on 29332 to a RPC server bound on localhost on port 19332 do:
|
||||
Then, to tunnel a SSL connection on 29332 to a RPC server bound on localhost on port 19334 do:
|
||||
|
||||
stunnel -d 29332 -r 127.0.0.1:19332 -p stunnel.pem -P ''
|
||||
stunnel -d 29332 -r 127.0.0.1:19334 -p stunnel.pem -P ''
|
||||
|
||||
It can also be set up system-wide in inetd style.
|
||||
|
||||
|
@ -43,7 +43,7 @@ config file):
|
||||
|
||||
HiddenServiceDir /var/lib/tor/litecoin-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 litecoind's P2P listen port (9333 by default).
|
||||
|
@ -23,7 +23,7 @@ class RawTransactionsTest(BitcoinTestFramework):
|
||||
self.nodes = start_nodes(self.num_nodes, self.options.tmpdir)
|
||||
|
||||
#connect to a local machine for debugging
|
||||
#url = "http://bitcoinrpc:DP6DvqZtqXarpeNWyN3LZTFchCCyCUuHwNF7E8pX99x1@%s:%d" % ('127.0.0.1', 19332)
|
||||
#url = "http://bitcoinrpc:DP6DvqZtqXarpeNWyN3LZTFchCCyCUuHwNF7E8pX99x1@%s:%d" % ('127.0.0.1', 19334)
|
||||
#proxy = AuthServiceProxy(url)
|
||||
#proxy.url = url # store URL on proxy for info
|
||||
#self.nodes.append(proxy)
|
||||
|
@ -178,8 +178,8 @@ public:
|
||||
consensus.nMajorityEnforceBlockUpgrade = 51;
|
||||
consensus.nMajorityRejectBlockOutdated = 75;
|
||||
consensus.nMajorityWindow = 100;
|
||||
consensus.BIP34Height = 400000;
|
||||
consensus.BIP34Hash = uint256S("0x860157ab24717e9694216938a9ae08cf4d58a15ca59a861e2d8469af0e6a1d50");
|
||||
consensus.BIP34Height = -1;
|
||||
consensus.BIP34Hash = uint256S("");
|
||||
consensus.powLimit = uint256S("00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
|
||||
consensus.nPowTargetTimespan = 3.5 * 24 * 60 * 60; // 3.5 days
|
||||
consensus.nPowTargetSpacing = 2.5 * 60;
|
||||
@ -202,18 +202,18 @@ public:
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1517356801; // January 31st, 2018
|
||||
|
||||
// The best chain should have at least this much work.
|
||||
consensus.nMinimumChainWork = uint256S("0x00000000000000000000000000000000000000000000000000006fce5d67766e");
|
||||
consensus.nMinimumChainWork = uint256S("0x00");
|
||||
|
||||
pchMessageStart[0] = 0xfc;
|
||||
pchMessageStart[1] = 0xc1;
|
||||
pchMessageStart[2] = 0xb7;
|
||||
pchMessageStart[3] = 0xdc;
|
||||
nDefaultPort = 19333;
|
||||
pchMessageStart[0] = 0xfd;
|
||||
pchMessageStart[1] = 0xd2;
|
||||
pchMessageStart[2] = 0xc8;
|
||||
pchMessageStart[3] = 0xf1;
|
||||
nDefaultPort = 19335;
|
||||
nPruneAfterHeight = 1000;
|
||||
|
||||
genesis = CreateGenesisBlock(1317798646, 385270584, 0x1e0ffff0, 1, 50 * COIN);
|
||||
genesis = CreateGenesisBlock(1486949366, 293345, 0x1e0ffff0, 1, 50 * COIN);
|
||||
consensus.hashGenesisBlock = genesis.GetHash();
|
||||
assert(consensus.hashGenesisBlock == uint256S("0xf5ae71e26c74beacc88382716aced69cddf3dffff24f384e1808905e0188f68f"));
|
||||
assert(consensus.hashGenesisBlock == uint256S("0x4966625a4b2851d9fdee139e56211a0d88575f59ed816ff5e6a63deb4e3e29a0"));
|
||||
assert(genesis.hashMerkleRoot == uint256S("0x97ddfbbae6be97fd6cdf3e7ca13232a3afff2353e29badfab7f73011edd4ced9"));
|
||||
|
||||
vFixedSeeds.clear();
|
||||
@ -240,10 +240,10 @@ public:
|
||||
|
||||
checkpointData = (CCheckpointData) {
|
||||
boost::assign::map_list_of
|
||||
( 546, uint256S("0xa0fea99a6897f531600c8ae53367b126824fd6a847b2b2b73817a95b8e27e602")),
|
||||
1365458829,
|
||||
547,
|
||||
576
|
||||
( 0, uint256S("0x4966625a4b2851d9fdee139e56211a0d88575f59ed816ff5e6a63deb4e3e29a0")),
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -45,8 +45,8 @@ class CBaseTestNetParams : public CBaseChainParams
|
||||
public:
|
||||
CBaseTestNetParams()
|
||||
{
|
||||
nRPCPort = 19332;
|
||||
strDataDir = "testnet3";
|
||||
nRPCPort = 19334;
|
||||
strDataDir = "testnet4";
|
||||
}
|
||||
};
|
||||
static CBaseTestNetParams testNetParams;
|
||||
|
@ -85,14 +85,7 @@ static SeedSpec6 pnSeed6_main[] = {
|
||||
};
|
||||
|
||||
static SeedSpec6 pnSeed6_test[] = {
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xf3,0x48,0xa6}, 19333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6b,0xbf,0x3a,0x54}, 19333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x7a,0x5c,0x84}, 19333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0xf5,0x3f,0xac}, 19333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0x61,0xd0,0x6e}, 19333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0x16,0x81,0x8b}, 19333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x69,0x7c,0x56}, 19333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x65,0xc9,0x2a,0x31}, 19333},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x09,0x71,0x4b}, 19333}
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x68,0xec,0xd3,0xce}, 19335},
|
||||
{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0xb2,0xb6,0x23}, 19335}
|
||||
};
|
||||
#endif // BITCOIN_CHAINPARAMSSEEDS_H
|
||||
|
@ -3598,7 +3598,7 @@ bool ContextualCheckBlock(const CBlock& block, CValidationState& state, CBlockIn
|
||||
}
|
||||
}
|
||||
|
||||
// Litecoin: (mainnet >= 710000, testnet >= 400000, regtest uses supermajority)
|
||||
// Litecoin: (mainnet >= 710000, regtest and testnet uses supermajority)
|
||||
// Enforce block.nVersion=2 rule that the coinbase starts with serialized block height
|
||||
// if 750 of the last 1,000 blocks are version 2 or greater (51/100 if testnet):
|
||||
bool checkHeightMismatch = false;
|
||||
@ -3606,13 +3606,13 @@ bool ContextualCheckBlock(const CBlock& block, CValidationState& state, CBlockIn
|
||||
{
|
||||
if (consensusParams.BIP34Height != -1)
|
||||
{
|
||||
// Mainnet 710k, Testnet 400k
|
||||
// Mainnet 710k
|
||||
if (nHeight >= consensusParams.BIP34Height)
|
||||
checkHeightMismatch = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Regtest and Unittest: use Bitcoin's supermajority rule
|
||||
// Regtest and Testnet: use Bitcoin's supermajority rule
|
||||
if (IsSuperMajority(2, pindexPrev, consensusParams.nMajorityRejectBlockOutdated, consensusParams))
|
||||
checkHeightMismatch = true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user