Skip to content

Commit

Permalink
Merge pull request #23 from NewYorkCoin-NYC/MinorFixes
Browse files Browse the repository at this point in the history
Minor fixes to testnet protocol and fee structure
  • Loading branch information
MrSlosh authored Apr 15, 2018
2 parents 1b71124 + 2896f2d commit 313b149
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 25 deletions.
18 changes: 9 additions & 9 deletions src/bitcoinrpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,12 @@ static const CRPCCommand vRPCCommands[] =
{ "addnode", &addnode, true, true, false },
{ "getaddednodeinfo", &getaddednodeinfo, true, true, false },
{ "getdifficulty", &getdifficulty, true, false, false },
// { "getnetworkhashps", &getnetworkhashps, true, false, false },
// { "getgenerate", &getgenerate, true, false, false },
// { "setgenerate", &setgenerate, true, false, true },
// { "gethashespersec", &gethashespersec, true, false, false },
{ "getnetworkhashps", &getnetworkhashps, true, false, false },
{ "getgenerate", &getgenerate, true, false, false },
{ "setgenerate", &setgenerate, true, false, true },
{ "gethashespersec", &gethashespersec, true, false, false },
{ "getinfo", &getinfo, true, false, false },
// { "getmininginfo", &getmininginfo, true, false, false },
{ "getmininginfo", &getmininginfo, true, false, false },
{ "getnewaddress", &getnewaddress, true, false, true },
{ "getaccountaddress", &getaccountaddress, true, false, true },
{ "setaccount", &setaccount, true, false, true },
Expand Down Expand Up @@ -245,12 +245,12 @@ static const CRPCCommand vRPCCommands[] =
{ "listaddressgroupings", &listaddressgroupings, false, false, true },
{ "signmessage", &signmessage, false, false, true },
{ "verifymessage", &verifymessage, false, false, false },
// { "getwork", &getwork, true, false, true },
// { "getworkex", &getworkex, true, false, true },
{ "getwork", &getwork, true, false, true },
{ "getworkex", &getworkex, true, false, true },
{ "listaccounts", &listaccounts, false, false, true },
{ "settxfee", &settxfee, false, false, true },
// { "getblocktemplate", &getblocktemplate, true, false, false },
// { "submitblock", &submitblock, false, false, false },
{ "getblocktemplate", &getblocktemplate, true, false, false },
{ "submitblock", &submitblock, false, false, false },
{ "setmininput", &setmininput, false, false, false },
{ "listsinceblock", &listsinceblock, false, false, true },
{ "dumpprivkey", &dumpprivkey, true, false, true },
Expand Down
22 changes: 11 additions & 11 deletions src/bitcoinrpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ class CRPCTable

extern const CRPCTable tableRPC;

//extern void InitRPCMining();
//extern void ShutdownRPCMining();
extern void InitRPCMining();
extern void ShutdownRPCMining();

extern int64 nWalletUnlockTime;
extern int64 AmountFromValue(const json_spirit::Value& value);
Expand All @@ -143,15 +143,15 @@ extern json_spirit::Value getaddednodeinfo(const json_spirit::Array& params, boo
extern json_spirit::Value dumpprivkey(const json_spirit::Array& params, bool fHelp); // in rpcdump.cpp
extern json_spirit::Value importprivkey(const json_spirit::Array& params, bool fHelp);

//extern json_spirit::Value getgenerate(const json_spirit::Array& params, bool fHelp); // in rpcmining.cpp
//extern json_spirit::Value setgenerate(const json_spirit::Array& params, bool fHelp);
//extern json_spirit::Value getnetworkhashps(const json_spirit::Array& params, bool fHelp);
//extern json_spirit::Value gethashespersec(const json_spirit::Array& params, bool fHelp);
//extern json_spirit::Value getmininginfo(const json_spirit::Array& params, bool fHelp);
//extern json_spirit::Value getworkex(const json_spirit::Array& params, bool fHelp);
//extern json_spirit::Value getwork(const json_spirit::Array& params, bool fHelp);
//extern json_spirit::Value getblocktemplate(const json_spirit::Array& params, bool fHelp);
//extern json_spirit::Value submitblock(const json_spirit::Array& params, bool fHelp);
extern json_spirit::Value getgenerate(const json_spirit::Array& params, bool fHelp); // in rpcmining.cpp
extern json_spirit::Value setgenerate(const json_spirit::Array& params, bool fHelp);
extern json_spirit::Value getnetworkhashps(const json_spirit::Array& params, bool fHelp);
extern json_spirit::Value gethashespersec(const json_spirit::Array& params, bool fHelp);
extern json_spirit::Value getmininginfo(const json_spirit::Array& params, bool fHelp);
extern json_spirit::Value getworkex(const json_spirit::Array& params, bool fHelp);
extern json_spirit::Value getwork(const json_spirit::Array& params, bool fHelp);
extern json_spirit::Value getblocktemplate(const json_spirit::Array& params, bool fHelp);
extern json_spirit::Value submitblock(const json_spirit::Array& params, bool fHelp);

extern json_spirit::Value getnewaddress(const json_spirit::Array& params, bool fHelp); // in rpcwallet.cpp
extern json_spirit::Value getaccountaddress(const json_spirit::Array& params, bool fHelp);
Expand Down
2 changes: 1 addition & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 2
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_BUILD 7
#define CLIENT_VERSION_BUILD 8

// Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
Expand Down
4 changes: 2 additions & 2 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void Shutdown()
RenameThread("bitcoin-shutoff");
nTransactionsUpdated++;
StopRPCThreads();
// ShutdownRPCMining();
ShutdownRPCMining();
if (pwalletMain)
bitdb.Flush(false);
GenerateBitcoins(false, NULL);
Expand Down Expand Up @@ -1125,7 +1125,7 @@ bool AppInit2(boost::thread_group& threadGroup)
StartNode(threadGroup);

// InitRPCMining is needed here so getwork/getblocktemplate in the GUI debug console works properly.
//InitRPCMining();
InitRPCMining();
if (fServer)
StartRPCThreads();

Expand Down
5 changes: 4 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,10 @@ int64 CTransaction::GetMinFee(unsigned int nBlockSize, bool fAllowFree,
// multiple transactions instead of one big transaction to avoid fees.
// * If we are creating a transaction we allow transactions up to 5,000 bytes
// to be considered safe and assume they can likely make it into this section.
if (nBytes < (mode == GMF_SEND ? 5000 : (DEFAULT_BLOCK_PRIORITY_SIZE - 1000)))
if (nBytes < (mode == GMF_SEND ? 10000 : (DEFAULT_BLOCK_PRIORITY_SIZE - 1000)))
nMinFee = 0;

if(nNewBlockSize < 27000)
nMinFee = 0;
}

Expand Down
2 changes: 1 addition & 1 deletion src/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
extern bool fTestNet;
static inline unsigned short GetDefaultPort(const bool testnet = fTestNet)
{
return testnet ? 117020 : 17020;
return testnet ? 27020 : 17020;
}


Expand Down

0 comments on commit 313b149

Please sign in to comment.