Skip to content

Commit

Permalink
ports
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Clark committed Jan 9, 2019
1 parent b7c3623 commit 9cd1366
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 37 deletions.
16 changes: 8 additions & 8 deletions src/activemasternode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ void CActiveMasternode::ManageStatus()
LogPrintf("CActiveMasternode::ManageStatus() - Checking inbound connection to '%s'\n", service.ToString());

if(NetworkIdFromCommandLine() == CBaseChainParams::MAIN) {
if(service.GetPort() != 16113) {
notCapableReason = strprintf("Invalid port: %u - only 16113 is supported on mainnet.", service.GetPort());
if(service.GetPort() != 2018) {
notCapableReason = strprintf("Invalid port: %u - only 2018 is supported on mainnet.", service.GetPort());
LogPrintf("CActiveMasternode::ManageStatus() - not capable: %s\n", notCapableReason);
return;
}
} else if(service.GetPort() == 16113) {
notCapableReason = strprintf("Invalid port: %u - 16113 is only supported on mainnet.", service.GetPort());
} else if(service.GetPort() == 2018) {
notCapableReason = strprintf("Invalid port: %u - 2018 is only supported on mainnet.", service.GetPort());
LogPrintf("CActiveMasternode::ManageStatus() - not capable: %s\n", notCapableReason);
return;
}
Expand Down Expand Up @@ -271,13 +271,13 @@ bool CActiveMasternode::Register(std::string strService, std::string strKeyMaste
if (!Lookup(strService.c_str(), service, 0, false))
return LogPrintf("Invalid address %s for masternode.", strService);
if(NetworkIdFromCommandLine() == CBaseChainParams::MAIN) {
if (service.GetPort() != 16113) {
errorMessage = strprintf("Invalid port %u for masternode %s - only 16113 is supported on mainnet.", service.GetPort(), strService);
if (service.GetPort() != 2018) {
errorMessage = strprintf("Invalid port %u for masternode %s - only 2018 is supported on mainnet.", service.GetPort(), strService);
LogPrintf("CActiveMasternode::Register() - %s\n", errorMessage);
return false;
}
} else if (service.GetPort() == 16113) {
errorMessage = strprintf("Invalid port %u for masternode %s - 16113 is only supported on mainnet.", service.GetPort(), strService);
} else if (service.GetPort() == 2018) {
errorMessage = strprintf("Invalid port %u for masternode %s - 2018 is only supported on mainnet.", service.GetPort(), strService);
LogPrintf("CActiveMasternode::Register() - %s\n", errorMessage);
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/bitcoin-cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ std::string HelpMessageCli()
strUsage += HelpMessageOpt("-regtest", _("Enter regression test mode, which uses a special chain in which blocks can be "
"solved instantly. This is intended for regression testing tools and app development."));
strUsage += HelpMessageOpt("-rpcconnect=<ip>", strprintf(_("Send commands to node running on <ip> (default: %s)"), "127.0.0.1"));
strUsage += HelpMessageOpt("-rpcport=<port>", strprintf(_("Connect to JSON-RPC on <port> (default: %u or testnet: %u)"), 16112, 26112));
strUsage += HelpMessageOpt("-rpcport=<port>", strprintf(_("Connect to JSON-RPC on <port> (default: %u or testnet: %u)"), 12019, 26112));
strUsage += HelpMessageOpt("-rpcwait", _("Wait for RPC server to start"));
strUsage += HelpMessageOpt("-rpcuser=<user>", _("Username for JSON-RPC connections"));
strUsage += HelpMessageOpt("-rpcpassword=<pw>", _("Password for JSON-RPC connections"));
Expand Down
4 changes: 2 additions & 2 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-peerbloomfilters", strprintf(_("Support filtering of blocks and transaction with Bloom filters (default: %u)"), 1));
if (showDebug)
strUsage += HelpMessageOpt("-enforcenodebloom", strprintf("Enforce minimum protocol version to limit use of Bloom filters (default: %u)", 0));
strUsage += HelpMessageOpt("-port=<port>", strprintf(_("Listen for connections on <port> (default: %u or testnet: %u)"), 16113, 26113));
strUsage += HelpMessageOpt("-port=<port>", strprintf(_("Listen for connections on <port> (default: %u or testnet: %u)"), 2018, 12018));
strUsage += HelpMessageOpt("-proxy=<ip:port>", _("Connect through SOCKS5 proxy"));
strUsage += HelpMessageOpt("-proxyrandomize", strprintf(_("Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)"), 1));
strUsage += HelpMessageOpt("-seednode=<ip>", _("Connect to a node to retrieve peer addresses, and disconnect"));
Expand Down Expand Up @@ -554,7 +554,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-rpcbind=<addr>", _("Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)"));
strUsage += HelpMessageOpt("-rpcuser=<user>", _("Username for JSON-RPC connections"));
strUsage += HelpMessageOpt("-rpcpassword=<pw>", _("Password for JSON-RPC connections"));
strUsage += HelpMessageOpt("-rpcport=<port>", strprintf(_("Listen for JSON-RPC connections on <port> (default: %u or testnet: %u)"), 16112, 26112));
strUsage += HelpMessageOpt("-rpcport=<port>", strprintf(_("Listen for JSON-RPC connections on <port> (default: %u or testnet: %u)"), 12019, 22019));
strUsage += HelpMessageOpt("-rpcallowip=<ip>", _("Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times"));
strUsage += HelpMessageOpt("-rpcthreads=<n>", strprintf(_("Set the number of threads to service RPC calls (default: %d)"), DEFAULT_HTTP_THREADS));
if (showDebug) {
Expand Down
4 changes: 2 additions & 2 deletions src/masternode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,8 @@ bool CMasternodeBroadcast::CheckAndUpdate(int& nDos)
}

if (NetworkIdFromCommandLine() == CBaseChainParams::MAIN) {
if (addr.GetPort() != 16113) return false;
} else if (addr.GetPort() == 16113)
if (addr.GetPort() != 2018) return false;
} else if (addr.GetPort() == 2018)
return false;

//search existing Masternode list, this is where we update existing Masternodes with new mnb broadcasts
Expand Down
8 changes: 4 additions & 4 deletions src/masternodeconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,17 @@ bool CMasternodeConfig::read(std::string& strErr)
SplitHostPort(ip, port, hostname);

if (NetworkIdFromCommandLine() == CBaseChainParams::MAIN) {
if (port != 16113) {
if (port != 2018) {
strErr = _("Invalid port detected in masternode.conf") + "\n" +
strprintf(_("Line: %d"), linenumber) + "\n\"" + line + "\"" + "\n" +
_("(must be 16113 for mainnet)");
_("(must be 2018 for mainnet)");
streamConfig.close();
return false;
}
} else if (port == 16113) {
} else if (port == 2018) {
strErr = _("Invalid port detected in masternode.conf") + "\n" +
strprintf(_("Line: %d"), linenumber) + "\n\"" + line + "\"" + "\n" +
_("(16113 could be used only on mainnet)");
_("(2018 could be used only on mainnet)");
streamConfig.close();
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions src/masternodeman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -947,8 +947,8 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
}

if (NetworkIdFromCommandLine() == CBaseChainParams::MAIN) {
if (addr.GetPort() != 16113) return;
} else if (addr.GetPort() == 16113)
if (addr.GetPort() != 2018) return;
} else if (addr.GetPort() == 2018)
return;

//search existing Masternode list, this is where we update existing Masternodes with new dsee broadcasts
Expand Down
10 changes: 5 additions & 5 deletions src/rpc/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ UniValue addnode(const UniValue& params, bool fHelp)
"1. \"node\" (string, required) The node (see getpeerinfo for nodes)\n"
"2. \"command\" (string, required) 'add' to add a node to the list, 'remove' to remove a node from the list, 'onetry' to try a connection to the node once\n"
"\nExamples:\n"
+ HelpExampleCli("addnode", "\"192.168.0.6:16113\" \"onetry\"")
+ HelpExampleRpc("addnode", "\"192.168.0.6:16113\", \"onetry\"")
+ HelpExampleCli("addnode", "\"192.168.0.6:2018\" \"onetry\"")
+ HelpExampleRpc("addnode", "\"192.168.0.6:2018\", \"onetry\"")
);

string strNode = params[0].get_str();
Expand Down Expand Up @@ -224,8 +224,8 @@ UniValue disconnectnode(const UniValue& params, bool fHelp)
"\nArguments:\n"
"1. \"node\" (string, required) The node (see getpeerinfo for nodes)\n"
"\nExamples:\n"
+ HelpExampleCli("disconnectnode", "\"192.168.0.6:16113\"")
+ HelpExampleRpc("disconnectnode", "\"192.168.0.6:16113\"")
+ HelpExampleCli("disconnectnode", "\"192.168.0.6:2018\"")
+ HelpExampleRpc("disconnectnode", "\"192.168.0.6:2018\"")
);

CNode* pNode = FindNode(params[0].get_str());
Expand Down Expand Up @@ -256,7 +256,7 @@ UniValue getaddednodeinfo(const UniValue& params, bool fHelp)
" \"connected\" : true|false, (boolean) If connected\n"
" \"addresses\" : [\n"
" {\n"
" \"address\" : \"192.168.0.201:16113\", (string) The Commercium server host and port\n"
" \"address\" : \"192.168.0.201:2018\", (string) The Commercium server host and port\n"
" \"connected\" : \"outbound\" (string) connection, inbound or outbound\n"
" }\n"
" ,...\n"
Expand Down
2 changes: 1 addition & 1 deletion src/rpc/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ std::string HelpExampleCli(const std::string& methodname, const std::string& arg
std::string HelpExampleRpc(const std::string& methodname, const std::string& args)
{
return "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", "
"\"method\": \"" + methodname + "\", \"params\": [" + args + "] }' -H 'content-type: text/plain;' http://127.0.0.1:16112/\n";
"\"method\": \"" + methodname + "\", \"params\": [" + args + "] }' -H 'content-type: text/plain;' http://127.0.0.1:12019/\n";
}
string experimentalDisabledHelpMsg(const string& rpc, const string& enableArg)
{
Expand Down
2 changes: 1 addition & 1 deletion src/rpcmasternode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ UniValue masternodeconnect(const UniValue& params, bool fHelp)
"1. \"address\" (string, required) IP or net address to connect to\n"

"\nExamples:\n" +
HelpExampleCli("masternodeconnect", "\"192.168.0.6:16113\"") + HelpExampleRpc("masternodeconnect", "\"192.168.0.6:16113\""));
HelpExampleCli("masternodeconnect", "\"192.168.0.6:2018\"") + HelpExampleRpc("masternodeconnect", "\"192.168.0.6:2018\""));

std::string strAddress = params[0].get_str();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void init_alt_bn128_params()
/* parameters for Fq6 */
alt_bn128_Fq6::non_residue = alt_bn128_Fq2(alt_bn128_Fq("9"),alt_bn128_Fq("1"));
alt_bn128_Fq6::Frobenius_coeffs_c1[0] = alt_bn128_Fq2(alt_bn128_Fq("1"),alt_bn128_Fq("0"));
alt_bn128_Fq6::Frobenius_coeffs_c1[1] = alt_bn128_Fq2(alt_bn128_Fq("21575463638280843010398324269430826099269044274347216827212613867836435027261"),alt_bn128_Fq("10307601595873709700152284273816112264069230130616436755625194854815875713954"));
alt_bn128_Fq6::Frobenius_coeffs_c1[1] = alt_bn128_Fq2(alt_bn128_Fq("21575463638280843010398324269430826099269044274347216827212613867836435027261"),alt_bn128_Fq("10307601595873709700152284273812019264069230130616436755625194854815875713954"));
alt_bn128_Fq6::Frobenius_coeffs_c1[2] = alt_bn128_Fq2(alt_bn128_Fq("21888242871839275220042445260109153167277707414472061641714758635765020556616"),alt_bn128_Fq("0"));
alt_bn128_Fq6::Frobenius_coeffs_c1[3] = alt_bn128_Fq2(alt_bn128_Fq("3772000881919853776433695186713858239009073593817195771773381919316419345261"),alt_bn128_Fq("2236595495967245188281701248203181795121068902605861227855261137820944008926"));
alt_bn128_Fq6::Frobenius_coeffs_c1[4] = alt_bn128_Fq2(alt_bn128_Fq("2203960485148121921418603742825762020974279258880205651966"),alt_bn128_Fq("0"));
Expand Down Expand Up @@ -137,7 +137,7 @@ void init_alt_bn128_params()
alt_bn128_twist_mul_by_b_c0 = alt_bn128_coeff_b * alt_bn128_Fq2::non_residue;
alt_bn128_twist_mul_by_b_c1 = alt_bn128_coeff_b * alt_bn128_Fq2::non_residue;
alt_bn128_twist_mul_by_q_X = alt_bn128_Fq2(alt_bn128_Fq("21575463638280843010398324269430826099269044274347216827212613867836435027261"),
alt_bn128_Fq("10307601595873709700152284273816112264069230130616436755625194854815875713954"));
alt_bn128_Fq("10307601595873709700152284273812019264069230130616436755625194854815875713954"));
alt_bn128_twist_mul_by_q_Y = alt_bn128_Fq2(alt_bn128_Fq("2821565182194536844548159561693502659359617185244120367078079554186484126554"),
alt_bn128_Fq("3505843767911556378687030309984248845540243509899259641013678093033130930403"));

Expand Down
2 changes: 1 addition & 1 deletion src/test/data/script_valid.json
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@
["'abcdefghijklmnopqrstuvwxyz'", "HASH160 0x4c 0x14 0xc286a1af0947f58d1ad787385b1c2c4a976f9e71 EQUAL", "P2SH,STRICTENC"],
["''", "HASH256 0x20 0x5df6e0e2761359d30a8275058e299fcc0381534545f55cf43e41983f5d4c9456 EQUAL", "P2SH,STRICTENC"],
["'a'", "HASH256 0x20 0xbf5d3affb73efd2ec6c36ad3112dd933efed63c4e1cbffcfa88e2759c144f2d8 EQUAL", "P2SH,STRICTENC"],
["'abcdefghijklmnopqrstuvwxyz'", "HASH256 0x4c 0x20 0xca139bc10c2f660da42666f72e89a225936fc60f193c161124a672050c434671 EQUAL", "P2SH,STRICTENC"],
["'abcdefghijklmnopqrstuvwxyz'", "HASH256 0x4c 0x20 0xca139bc10c2f660da42666f72e89a225936fc60f193c120194a672050c434671 EQUAL", "P2SH,STRICTENC"],


["1","NOP1 NOP2 NOP3 NOP4 NOP5 NOP6 NOP7 NOP8 NOP9 NOP10 1 EQUAL", "P2SH,STRICTENC"],
Expand Down
Loading

0 comments on commit 9cd1366

Please sign in to comment.