Skip to content

Commit 08fcd79

Browse files
authored
Merge pull request #7 from CryptoCurrencyStuff/master
Add support for the estimatefee JSON RPC call
2 parents f592584 + 781312a commit 08fcd79

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/bitcoinapi/bitcoinapi.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,14 @@ bool BitcoinAPI::settxfee(double amount) {
377377
return result.asBool();
378378
}
379379

380+
double BitcoinAPI::estimatefee(int blocks) {
381+
string command = "estimatefee";
382+
Value params, result;
383+
params.append(blocks);
384+
result = sendcommand(command, params);
385+
return result.asDouble();
386+
}
387+
380388
string BitcoinAPI::signmessage(const std::string& bitcoinaddress, const std::string& message) {
381389
string command = "signmessage";
382390
Value params, result;

src/bitcoinapi/bitcoinapi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class BitcoinAPI
6161

6262
void keypoolrefill();
6363
bool settxfee(double amount);
64+
double estimatefee(int blocks);
6465

6566
std::string signmessage(const std::string& bitcoinaddress, const std::string& message);
6667
bool verifymessage(const std::string& bitcoinaddress, const std::string& signature, const std::string& message);

0 commit comments

Comments
 (0)