Skip to content

Commit a0544a1

Browse files
author
Chris
committed
Changes in mnbudget
1 parent 8c055a4 commit a0544a1

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
33
define(_CLIENT_VERSION_MAJOR, 2)
44
define(_CLIENT_VERSION_MINOR, 0)
55
define(_CLIENT_VERSION_REVISION, 1)
6-
define(_CLIENT_VERSION_BUILD, 0)
6+
define(_CLIENT_VERSION_BUILD, 1)
77
define(_CLIENT_VERSION_IS_RELEASE, true)
88
define(_COPYRIGHT_YEAR, 2018)
99
AC_INIT([Bitcloud Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://bit-cloud.info],[bitcloud])

src/clientversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#define CLIENT_VERSION_MAJOR 2
1818
#define CLIENT_VERSION_MINOR 0
1919
#define CLIENT_VERSION_REVISION 1
20-
#define CLIENT_VERSION_BUILD 0
20+
#define CLIENT_VERSION_BUILD 1
2121
//bitcoingui.cpp L116
2222
//! Set to true for release, false for prerelease or test build
2323
#define CLIENT_VERSION_IS_RELEASE true

src/rpcmasternode-budget.cpp

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
#include "masternodeman.h"
1515
#include "rpcserver.h"
1616
#include "utilmoneystr.h"
17-
17+
#include <string>
18+
#include <iostream>
1819
#include <fstream>
1920
using namespace json_spirit;
2021
using namespace std;
@@ -66,9 +67,17 @@ Value mnbudget(const Array& params, bool fHelp)
6667
if (strURL.size() > 64)
6768
return "Invalid url, limit of 64 characters.";
6869

70+
std::string nPaymenttext = params[3].get_str();
71+
int nPaymentCount = std::stoi(nPaymenttext);
72+
//LogPrintf("nPaymentCount %d",nPaymentCount);
73+
if (nPaymentCount < 1 || nPaymentCount > 12)
74+
return "Invalid payment count, must be more than zero or few than 13";
75+
/*
76+
This part works not.
6977
int nPaymentCount = params[3].get_int();
7078
if (nPaymentCount < 1)
7179
return "Invalid payment count, must be more than zero.";
80+
*/
7281

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

154+
std::string nPaymenttext = params[3].get_str();
155+
int nPaymentCount = std::stoi(nPaymenttext);
156+
//LogPrintf("nPaymentCount %d",nPaymentCount);
157+
if (nPaymentCount < 1 || nPaymentCount > 12)
158+
return "Invalid payment count, must be more than zero or few than 13";
159+
160+
/*
161+
This part works not.
145162
int nPaymentCount = params[3].get_int();
146163
if (nPaymentCount < 1)
147-
return "Invalid payment count, must be more than zero.";
164+
return "Invalid payment count, must be more than zero.";
165+
*/
148166

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

0 commit comments

Comments
 (0)