regtest working; basic regtest server tested with single node
This commit is contained in:
parent
0f3407e87a
commit
3336cdec3c
@ -173,9 +173,9 @@ public:
|
||||
|
||||
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,35);
|
||||
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,8);
|
||||
base58Prefixes[SCRIPT_ADDRESS2] = std::vector<unsigned char>(1,50);
|
||||
base58Prefixes[SECRET_KEY] = std::vector<unsigned char>(1,176);
|
||||
base58Prefixes[EXT_PUBLIC_KEY] = {0x01, 0x34, 0x40, 0x6b};
|
||||
base58Prefixes[SCRIPT_ADDRESS2] = std::vector<unsigned char>(1,94);
|
||||
base58Prefixes[SECRET_KEY] = std::vector<unsigned char>(1,163);
|
||||
base58Prefixes[EXT_PUBLIC_KEY] = {0x01, 0x34, 0x40, 0x6b}; //Fpub, Fprv for mainnet
|
||||
base58Prefixes[EXT_SECRET_KEY] = {0x01, 0x34, 0x3c, 0x31};
|
||||
|
||||
vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_main, pnSeed6_main + ARRAYLEN(pnSeed6_main));
|
||||
@ -256,8 +256,7 @@ public:
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 0; //must be 0 to not use segwit // 1530446401; // July 1, 2018 FLO future date
|
||||
|
||||
// The best chain should have at least this much work.
|
||||
// consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000000000000000083540886d");
|
||||
consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000000000000800000000");
|
||||
consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000000000000000083540886d");
|
||||
|
||||
// By default assume that the signatures in ancestors of this block are valid.
|
||||
consensus.defaultAssumeValid = uint256S("0x4be79531ee8b0f410f0d8c8d785083acb4e14e5d54b0820502bc60f98a629b19"); //flo testnet block 20,000
|
||||
@ -310,7 +309,7 @@ public:
|
||||
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,198);
|
||||
base58Prefixes[SCRIPT_ADDRESS2] = std::vector<unsigned char>(1,58); // ToDo: bflorincoin?
|
||||
base58Prefixes[SECRET_KEY] = std::vector<unsigned char>(1,239); // ToDo: bflorincoin?
|
||||
base58Prefixes[EXT_PUBLIC_KEY] = {0x01, 0x34, 0x40, 0xe2};
|
||||
base58Prefixes[EXT_PUBLIC_KEY] = {0x01, 0x34, 0x40, 0xe2}; //Fput, Fprt for testnet
|
||||
base58Prefixes[EXT_SECRET_KEY] = {0x01, 0x34, 0x3c, 0x23};
|
||||
|
||||
vFixedSeeds = std::vector<SeedSpec6>(pnSeed6_test, pnSeed6_test + ARRAYLEN(pnSeed6_test));
|
||||
@ -337,6 +336,7 @@ public:
|
||||
|
||||
/**
|
||||
* Regression test
|
||||
* https://bitcoin.org/en/developer-examples#regtest-mode
|
||||
*/
|
||||
class CRegTestParams : public CChainParams {
|
||||
public:
|
||||
@ -348,17 +348,22 @@ public:
|
||||
consensus.BIP65Height = 1351; // BIP65 activated on regtest (Used in rpc activation tests)
|
||||
consensus.BIP66Height = 1251; // BIP66 activated on regtest (Used in rpc activation tests)
|
||||
consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
|
||||
consensus.nPowTargetSpacing = 2.5 * 60;
|
||||
// consensus.nPowTargetSpacing = 2.5 * 60;
|
||||
|
||||
consensus.fPowAllowMinDifficultyBlocks = true;
|
||||
consensus.fPowNoRetargeting = true;
|
||||
consensus.nRuleChangeActivationThreshold = 108; // 75% for testchains
|
||||
consensus.nMinerConfirmationWindow = 144; // Faster than normal for regtest (144 instead of 2016)
|
||||
consensus.nRuleChangeActivationThreshold = 432; // 75% for testchains
|
||||
consensus.nMinerConfirmationWindow = 576; // Faster than normal for regtest (144 instead of 2016)
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = 0;
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 999999999999ULL;
|
||||
|
||||
// Deployment of BIP68, BIP112, and BIP113.
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_CSV].bit = 0;
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nStartTime = 0;
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_CSV].nTimeout = 999999999999ULL;
|
||||
|
||||
// Deployment of SegWit (BIP141, BIP143, and BIP147)
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].bit = 1;
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nStartTime = 0;
|
||||
consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 999999999999ULL;
|
||||
@ -394,43 +399,47 @@ public:
|
||||
* The message start string is designed to be unlikely to occur in normal data.
|
||||
* The characters are rarely used upper ASCII, not valid as UTF-8, and produce
|
||||
* a large 32-bit integer with any alignment.
|
||||
*/pchMessageStart[0] = 0xfa;
|
||||
*/
|
||||
pchMessageStart[0] = 0xfa;
|
||||
pchMessageStart[1] = 0xbf;
|
||||
pchMessageStart[2] = 0xb5;
|
||||
pchMessageStart[3] = 0xda;
|
||||
nDefaultPort = 19444;
|
||||
nDefaultPort = 17412;
|
||||
nPruneAfterHeight = 1000;
|
||||
|
||||
genesis = CreateGenesisBlock(1296688602, 0, 0x207fffff, 1, 50 * COIN);
|
||||
genesis = CreateGenesisBlock(1371387277, 0, 0x207fffff, 1, 100 * COIN);
|
||||
consensus.hashGenesisBlock = genesis.GetHash();
|
||||
assert(consensus.hashGenesisBlock == uint256S("0x530827f38f93b43ed12af0b3ad25a288dc02ed74d6d7857862df51fc56c416f9"));
|
||||
assert(genesis.hashMerkleRoot == uint256S("0x97ddfbbae6be97fd6cdf3e7ca13232a3afff2353e29badfab7f73011edd4ced9"));
|
||||
std::cout << "consensus.hashGenesisBlock:" << consensus.hashGenesisBlock.ToString() << "\n";
|
||||
std::cout << "genesis.hashMerkleRoot:" << genesis.hashMerkleRoot.ToString() << "\n";
|
||||
assert(consensus.hashGenesisBlock == uint256S("0xec42fa26ca6dcb1103b59a1d24b161935ea4566f8d5736db8917d5b9a8dee0d7"));
|
||||
assert(genesis.hashMerkleRoot == uint256S("0x730f0c8ddc5a592d5512566890e2a73e45feaa6748b24b849d1c29a7ab2b2300"));
|
||||
|
||||
vFixedSeeds.clear(); //!< Regtest mode doesn't have any fixed seeds.
|
||||
vSeeds.clear(); //!< Regtest mode doesn't have any DNS seeds.
|
||||
|
||||
fDefaultConsistencyChecks = true;
|
||||
fRequireStandard = false;
|
||||
fMineBlocksOnDemand = true;
|
||||
|
||||
checkpointData = (CCheckpointData) {
|
||||
{
|
||||
{0, uint256S("530827f38f93b43ed12af0b3ad25a288dc02ed74d6d7857862df51fc56c416f9")},
|
||||
}
|
||||
};
|
||||
|
||||
chainTxData = ChainTxData{
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,111);
|
||||
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);
|
||||
base58Prefixes[SCRIPT_ADDRESS2] = std::vector<unsigned char>(1,58);
|
||||
base58Prefixes[SECRET_KEY] = std::vector<unsigned char>(1,239);
|
||||
base58Prefixes[EXT_PUBLIC_KEY] = {0x04, 0x35, 0x87, 0xCF};
|
||||
base58Prefixes[EXT_SECRET_KEY] = {0x04, 0x35, 0x83, 0x94};
|
||||
|
||||
fDefaultConsistencyChecks = true;
|
||||
fRequireStandard = false;
|
||||
fMineBlocksOnDemand = true;
|
||||
|
||||
// checkpointData = (CCheckpointData) {
|
||||
// {
|
||||
// {0, uint256S("530827f38f93b43ed12af0b3ad25a288dc02ed74d6d7857862df51fc56c416f9")},
|
||||
// }
|
||||
// };
|
||||
|
||||
chainTxData = ChainTxData{
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user