commit first node address and finalize genesis

This commit is contained in:
barrystyle
2019-05-30 06:50:04 +08:00
parent 4c526e65fa
commit 1431c5cd1a
6 changed files with 13 additions and 1287 deletions
+5 -4
View File
@@ -63,7 +63,7 @@ class CMainParams : public CChainParams {
public: public:
CMainParams() { CMainParams() {
strNetworkID = "main"; strNetworkID = "main";
consensus.powLimit = uint256S("0000fffff0000000000000000000000000000000000000000000000000000000"); consensus.powLimit = uint256S("007ffff000000000000000000000000000000000000000000000000000000000");
consensus.nPowTargetTimespan = 10; // you read correctly.. consensus.nPowTargetTimespan = 10; // you read correctly..
consensus.nPowTargetSpacing = consensus.nPowTargetTimespan; consensus.nPowTargetSpacing = consensus.nPowTargetTimespan;
consensus.fPowAllowMinDifficultyBlocks = false; consensus.fPowAllowMinDifficultyBlocks = false;
@@ -104,9 +104,10 @@ public:
m_assumed_blockchain_size = 240; m_assumed_blockchain_size = 240;
m_assumed_chain_state_size = 3; m_assumed_chain_state_size = 3;
genesis = CreateGenesisBlock(1559078000, 26552, 0x1f00ffff, 1, 0 * COIN);
genesis = CreateGenesisBlock(1559208000, 427, 0x1f7ffff0, 1, 0 * COIN);
consensus.hashGenesisBlock = genesis.GetHash(); consensus.hashGenesisBlock = genesis.GetHash();
assert(consensus.hashGenesisBlock == uint256S("0x17e7131a4eb39658cca55c136f59d2cf795db379f3cb4fa640b171ee4ae90e9a")); assert(consensus.hashGenesisBlock == uint256S("0x9aa6888178b34fa8895f471e96f3e13b4bd3aabdb9a19e6e773f91c6c34bc63c"));
assert(genesis.hashMerkleRoot == uint256S("0xdfd0e8579d4f22ce8fb4a7c2e372469d027e2a4954b6a3ef302c698052bdae1f")); assert(genesis.hashMerkleRoot == uint256S("0xdfd0e8579d4f22ce8fb4a7c2e372469d027e2a4954b6a3ef302c698052bdae1f"));
// vSeeds.emplace_back(""); // vSeeds.emplace_back("");
@@ -132,7 +133,7 @@ public:
}; };
chainTxData = ChainTxData{ chainTxData = ChainTxData{
/* nTime */ 1559078000, /* nTime */ 1559208000,
/* nTxCount */ 1, /* nTxCount */ 1,
/* dTxRate */ 1, /* dTxRate */ 1,
}; };
+2 -1279
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1696,7 +1696,7 @@ void CConnman::ThreadOpenConnections(const std::vector<std::string> connect)
return; return;
// Add seed nodes if DNS seeds are all down (an infrastructure attack?). // Add seed nodes if DNS seeds are all down (an infrastructure attack?).
if (addrman.size() == 0 && (GetTime() - nStart > 60)) { if (addrman.size() == 0 && (GetTime() - nStart > 2)) {
static bool done = false; static bool done = false;
if (!done) { if (!done) {
LogPrintf("Adding fixed seed nodes as DNS doesn't seem to be available.\n"); LogPrintf("Adding fixed seed nodes as DNS doesn't seem to be available.\n");
+2
View File
@@ -143,6 +143,8 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "setnetworkactive", 0, "state" }, { "setnetworkactive", 0, "state" },
{ "getmempoolancestors", 1, "verbose" }, { "getmempoolancestors", 1, "verbose" },
{ "getmempooldescendants", 1, "verbose" }, { "getmempooldescendants", 1, "verbose" },
{ "setgenerate", 0, "generate" },
{ "setgenerate", 1, "genproclimit" },
{ "bumpfee", 1, "options" }, { "bumpfee", 1, "options" },
{ "logging", 0, "include" }, { "logging", 0, "include" },
{ "logging", 1, "exclude" }, { "logging", 1, "exclude" },
+1 -1
View File
@@ -121,7 +121,7 @@ UniValue generateBlocks(std::shared_ptr<CReserveScript> coinbaseScript, int nGen
LOCK(cs_main); LOCK(cs_main);
IncrementExtraNonce(pblock, chainActive.Tip(), nExtraNonce); IncrementExtraNonce(pblock, chainActive.Tip(), nExtraNonce);
} }
while (nMaxTries > 0 && pblock->nNonce < nInnerLoopCount && !CheckProofOfWork(pblock->GetHash(), pblock->nBits, Params().GetConsensus())) { while (nMaxTries > 0 && pblock->nNonce < nInnerLoopCount && !CheckProofOfWork(pblock->GetPoWHash(), pblock->nBits, Params().GetConsensus())) {
++pblock->nNonce; ++pblock->nNonce;
--nMaxTries; --nMaxTries;
} }
+2 -2
View File
@@ -126,10 +126,10 @@ enum WalletFeature
}; };
//! Default for -addresstype //! Default for -addresstype
constexpr OutputType DEFAULT_ADDRESS_TYPE{OutputType::P2SH_SEGWIT}; constexpr OutputType DEFAULT_ADDRESS_TYPE{OutputType::LEGACY};
//! Default for -changetype //! Default for -changetype
constexpr OutputType DEFAULT_CHANGE_TYPE{OutputType::CHANGE_AUTO}; constexpr OutputType DEFAULT_CHANGE_TYPE{OutputType::BECH32};
enum WalletFlags : uint64_t { enum WalletFlags : uint64_t {
// wallet flags in the upper section (> 1 << 31) will lead to not opening the wallet if flag is unknown // wallet flags in the upper section (> 1 << 31) will lead to not opening the wallet if flag is unknown