Skip to content

Commit

Permalink
Changes in mnbudget
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris committed Jun 4, 2018
1 parent 8c055a4 commit a0544a1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 2)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 1)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_BUILD, 1)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2018)
AC_INIT([Bitcloud Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://bit-cloud.info],[bitcloud])
Expand Down
2 changes: 1 addition & 1 deletion src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#define CLIENT_VERSION_MAJOR 2
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 1
#define CLIENT_VERSION_BUILD 0
#define CLIENT_VERSION_BUILD 1
//bitcoingui.cpp L116
//! Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
Expand Down
22 changes: 20 additions & 2 deletions src/rpcmasternode-budget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
#include "masternodeman.h"
#include "rpcserver.h"
#include "utilmoneystr.h"

#include <string>
#include <iostream>
#include <fstream>
using namespace json_spirit;
using namespace std;
Expand Down Expand Up @@ -66,9 +67,17 @@ Value mnbudget(const Array& params, bool fHelp)
if (strURL.size() > 64)
return "Invalid url, limit of 64 characters.";

std::string nPaymenttext = params[3].get_str();
int nPaymentCount = std::stoi(nPaymenttext);
//LogPrintf("nPaymentCount %d",nPaymentCount);
if (nPaymentCount < 1 || nPaymentCount > 12)
return "Invalid payment count, must be more than zero or few than 13";
/*
This part works not.
int nPaymentCount = params[3].get_int();
if (nPaymentCount < 1)
return "Invalid payment count, must be more than zero.";
*/

//set block min
if (pindexPrev != NULL) nBlockMin = pindexPrev->nHeight - GetBudgetPaymentCycleBlocks() * (nPaymentCount + 1);
Expand Down Expand Up @@ -142,9 +151,18 @@ Value mnbudget(const Array& params, bool fHelp)
if (strURL.size() > 64)
return "Invalid url, limit of 64 characters.";

std::string nPaymenttext = params[3].get_str();
int nPaymentCount = std::stoi(nPaymenttext);
//LogPrintf("nPaymentCount %d",nPaymentCount);
if (nPaymentCount < 1 || nPaymentCount > 12)
return "Invalid payment count, must be more than zero or few than 13";

/*
This part works not.
int nPaymentCount = params[3].get_int();
if (nPaymentCount < 1)
return "Invalid payment count, must be more than zero.";
return "Invalid payment count, must be more than zero.";
*/

//set block min
if (pindexPrev != NULL) nBlockMin = pindexPrev->nHeight - GetBudgetPaymentCycleBlocks() * (nPaymentCount + 1);
Expand Down

0 comments on commit a0544a1

Please sign in to comment.