diff --git a/src/chainparams.cpp b/src/chainparams.cpp index d3e904b9..80d6f83e 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -103,9 +103,30 @@ class CMainParams : public CChainParams { // MWEB will be automatically activated after block 99999999 for now. // The best chain should have at least this much work. - consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000000025004406a93795"); // A total of 10414 866307 823509 hashes (10.4 PH) of work as of block 60000. + consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000000000009cec62dc44b76d"); + // A total of 44170 005713 303405 hashes (44.2 PH) of work as of block 100000. + + // consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000000000009cec62dc44b76d"); + // A total of 44170 005713 303405 hashes (44.17 PH) of work as of block 100000. + // consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000000025004406a93795"); + // A total of 10414 866307 823509 hashes (10.41 PH) of work as of block 60000. + // consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000000003f1caaf8e7d1f"); + // A total of 1110 277761 170719 hashes (1.110 PH) of work as of block 30000. + // consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000000000aaf695561da1"); + // A total of 187 976044 125601 hashes (188.0 TH) of work as of block 10000. + // By default assume that the signatures in ancestors of this block are valid. - consensus.defaultAssumeValid = uint256S("0xf38b639a8db731e7dac96eaae8f9ab443eaf85039433197345a72e1961d7f286"); // 60000 + consensus.defaultAssumeValid = uint256S("0x022dc4410add84d46359013d45df952493c53343304296a9066fc3df03dc8297"); + // Block 100000 + + // consensus.defaultAssumeValid = uint256S("0x022dc4410add84d46359013d45df952493c53343304296a9066fc3df03dc8297"); + // Block 100000 + // consensus.defaultAssumeValid = uint256S("0xf38b639a8db731e7dac96eaae8f9ab443eaf85039433197345a72e1961d7f286"); + // Block 60000 + // consensus.defaultAssumeValid = uint256S("0x64ddec3dde1a4fd6c41d06aacfc27694cfc9c3094574ae83fe51ef4740956a95"); + // Block 30000 + // consensus.defaultAssumeValid = uint256S("0xf5da0fabe25733a186805366c0fdede73e2454e782083676e7627b8ec991ef9b"); + // Block 10000 /** * The message start string is designed to be unlikely to occur in normal data. @@ -126,26 +147,11 @@ class CMainParams : public CChainParams { assert(consensus.hashGenesisBlock == uint256S("0x46ca17415c18e43f5292034ebf9bbd10de80a61fc6dc17180e6609f33d3b48f3")); assert(genesis.hashMerkleRoot == uint256S("0x3db2b5aa928b56b8f38dc404f5bdb9e76209906b91ba175361acdc2405b19592")); - // Note that of those which support the service bits prefix, most only support a subset of - // possible options. - // This is fine at runtime as we'll fall back to using them as an addrfetch if they don't support the - // service bits we want, but we should get them updated to support all service bits wanted by any - // release ASAP to avoid it where possible. + // Seed servers to connect to other nodes. + // Default configuration file contains nodes of popular ferritecoin mining pools. vSeeds.emplace_back("node1.ferritecoin.org"); // node1.ferritecoin.org - vSeeds.emplace_back("node2.ferritecoin.org"); // node1.ferritecoin.org - vSeeds.emplace_back("node3.ferritecoin.org"); // node1.ferritecoin.org - - vSeeds.emplace_back("188.165.227.178"); // spools.online - vSeeds.emplace_back("207.244.243.35"); // luckydogpool.com - vSeeds.emplace_back("144.91.107.170"); // coinxpool.com - vSeeds.emplace_back("155.138.247.235"); // miningmypool.com - vSeeds.emplace_back("155.133.26.223"); // zeusminingpool.com - - vSeeds.emplace_back("node2.walletbuilders.com"); // node2.walletbuilders.com - - vSeeds.emplace_back("31.125.159.200"); // findblocks.net - // vSeeds.emplace_back("89.252.188.59"); // cminer.org - // vSeeds.emplace_back("seed01.altcoinbuilders.com"); // Tyler Anderson's pool + vSeeds.emplace_back("node2.ferritecoin.org"); // node2.ferritecoin.org + vSeeds.emplace_back("node3.ferritecoin.org"); // node3.ferritecoin.org base58Prefixes[PUBKEY_ADDRESS] = std::vector(1,36); base58Prefixes[SCRIPT_ADDRESS] = std::vector(1,5); @@ -177,13 +183,14 @@ class CMainParams : public CChainParams { { 10000, uint256S("0xf5da0fabe25733a186805366c0fdede73e2454e782083676e7627b8ec991ef9b")}, { 30000, uint256S("0x64ddec3dde1a4fd6c41d06aacfc27694cfc9c3094574ae83fe51ef4740956a95")}, { 60000, uint256S("0xf38b639a8db731e7dac96eaae8f9ab443eaf85039433197345a72e1961d7f286")}, + { 100000, uint256S("0x022dc4410add84d46359013d45df952493c53343304296a9066fc3df03dc8297")}, } }; chainTxData = ChainTxData{ - /* nTime */ 1674730012, - /* nTxCount */ 67650, - /* dTxRate */ 0.01153600 + /* nTime */ 1677953251, + /* nTxCount */ 111405, + /* dTxRate */ 0.01352083 }; } }; @@ -247,7 +254,9 @@ class CTestNetParams : public CChainParams { vFixedSeeds.clear(); vSeeds.clear(); // nodes with support for servicebits filtering should be at the top - vSeeds.emplace_back("118.189.201.104"); + vSeeds.emplace_back("node1.ferritecoin.org"); // node1.ferritecoin.org + vSeeds.emplace_back("node2.ferritecoin.org"); // node1.ferritecoin.org + vSeeds.emplace_back("node3.ferritecoin.org"); // node1.ferritecoin.org base58Prefixes[PUBKEY_ADDRESS] = std::vector(1,111); diff --git a/src/init.cpp b/src/init.cpp index d5099f91..46f8fc3a 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1333,8 +1333,61 @@ bool AppInitMain(const util::Ref& context, NodeContext& node, interfaces::BlockA // Warn if no conf file exists at path provided by user InitWarning(strprintf(_("The specified config file %s does not exist\n"), config_file_path.string())); } else { + /* // Not categorizing as "Warning" because it's the default behavior LogPrintf("Config file: %s (not found, skipping)\n", config_file_path.string()); + */ + // Not categorizing as "Warning" because it's the default behavior + LogPrintf("Config file: %s (not found, automatically creating default config file)\n", config_file_path.string()); + + FILE* configFile = fopen(GetConfigFile(gArgs.GetArg("-conf", BITCOIN_CONF_FILENAME)).string().c_str(), "a"); + if (configFile != NULL) { + std::string strHeader = "# Ferrite Core configuration file:\n" + "\n" + "# Node settings (default: Full Node):\n" + "daemon=1\n" + "server=1\n" + "txindex=1\n" + "listen=1\n" + "daemon=1\n" + "upnp=1\n" + "\n" + "# RPC settings (default: Local network only)\n" + "rpcuser=user\n" + "rpcpassword=password\n" + "port=9574\n" + "rpcport=9573\n" + "rpcbind=127.0.0.1\n" + "rpcallowip=127.0.0.1\n" + "rpcthreads=32\n" + "\n" + "# Relay and fee settings (default: 1 atom/vB)\n" + "mintxfee=0.00001\n" + "minrelaytxfee=0.00001\n" + "rpcconnect=500\n" + "maxconnections=500\n" + "\n" + "# Depreciated RPCs for compatibility\n" + "deprecatedrpc=accounts\n" + "deprecatedrpc=generate\n" + "\n" + "# Nodes:\n" + "addnode=node1.ferritecoin.org\n" + "addnode=node2.ferritecoin.org\n" + "addnode=node3.ferritecoin.org\n" + "addnode=node2.walletbuilders.com\n" + "addnode=118.189.201.104:9574\n" + "addnode=188.165.227.178:9574 # spools.online \n" + "addnode=207.244.243.35:9574 # luckydogpool.com \n" + "addnode=144.91.107.170:9574 # coinxpool.com \n" + "addnode=83.61.85.197:9574 # 2miningpool.com \n" + "addnode=155.138.247.235:9574 # miningmypool.com \n" + "addnode=155.133.26.223:9574 # zeusminingpool.com \n" + "\n"; + + fwrite(strHeader.c_str(), std::strlen(strHeader.c_str()), 1, configFile); + fclose(configFile); + } } // Log the config arguments to debug.log