Skip to content

Commit a291275

Browse files
author
minium
committed
Cleanup after last merge
1 parent 36adef1 commit a291275

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

src/bitcoinapi/bitcoinapi.cpp

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ void BitcoinAPI::importprivkey(const string& bitcoinprivkey, const string& label
291291
sendcommand(command, params);
292292
}
293293

294-
void BitcoinAPI::importAddress(const string& address, const string& account, bool rescan) {
294+
void BitcoinAPI::importaddress(const string& address, const string& account, bool rescan) {
295295
string command = "importaddress";
296296
Value params, result;
297297
params.append(address);
@@ -427,28 +427,17 @@ double BitcoinAPI::getbalance() {
427427
return result.asDouble();
428428
}
429429

430-
double BitcoinAPI::getbalance(const string& account, int minconf) {
430+
double BitcoinAPI::getbalance(const string& account, int minconf, bool includewatchonly) {
431431
string command = "getbalance";
432432
Value params, result;
433433
params.append(account);
434434
params.append(minconf);
435+
params.append(includewatchonly);
435436
result = sendcommand(command, params);
436437

437438
return result.asDouble();
438439
}
439440

440-
double BitcoinAPI::getbalance(const string& account, int minconf, bool includeWatchOnly) {
441-
string command = "getbalance";
442-
Value params, result;
443-
params.append(account);
444-
params.append(minconf);
445-
params.append(includeWatchOnly);
446-
result = sendcommand(command, params);
447-
448-
return result.asDouble();
449-
}
450-
451-
452441
double BitcoinAPI::getunconfirmedbalance() {
453442
string command = "getunconfirmedbalance";
454443
Value params, result;

src/bitcoinapi/bitcoinapi.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class BitcoinAPI
2525

2626
public:
2727
/* === Constructor and Destructor === */
28-
BitcoinAPI(const std::string& user, const std::string& password, const std::string& host, int port, int httpTimeout);
28+
BitcoinAPI(const std::string& user, const std::string& password, const std::string& host, int port, int httpTimeout = 50000);
2929
~BitcoinAPI();
3030

3131
/* === Auxiliary functions === */
@@ -53,7 +53,7 @@ class BitcoinAPI
5353
std::string dumpprivkey(const std::string& bitcoinaddress);
5454
void importprivkey(const std::string& bitcoinprivkey);
5555
void importprivkey(const std::string& bitcoinprivkey, const std::string& label, bool rescan = true);
56-
void importAddress(const std::string& address, const std::string& account, bool rescan);
56+
void importaddress(const std::string& address, const std::string& account, bool rescan = true);
5757

5858
std::string addmultisigaddress(int nrequired, const std::vector<std::string>& keys);
5959
std::string addmultisigaddress(int nrequired, const std::vector<std::string>& keys, const std::string& account);
@@ -74,8 +74,7 @@ class BitcoinAPI
7474

7575
/* === Accounting === */
7676
double getbalance();
77-
double getbalance(const std::string& account, int minconf = 1);
78-
double getbalance(const std::string& account, int minconf = 1, bool includeWatchOnly = false);
77+
double getbalance(const std::string& account, int minconf = 1, bool includewatchonly = false);
7978
double getunconfirmedbalance();
8079

8180
double getreceivedbyaccount(const std::string& account, int minconf = 1);

0 commit comments

Comments
 (0)