File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -406,6 +406,17 @@ double BitcoinAPI::estimatefee(int blocks) {
406
406
return result.asDouble ();
407
407
}
408
408
409
+ smartfee_t BitcoinAPI::estimatesmartfee (int blocks) {
410
+ string command = " estimatesmartfee" ;
411
+ Value params, result;
412
+ smartfee_t ret;
413
+ params.append (blocks);
414
+ result = sendcommand (command, params);
415
+ ret.feerate = result[" feerate" ].asDouble ();
416
+ ret.blocks = result[" blocks" ].asInt ();
417
+ return ret;
418
+ }
419
+
409
420
string BitcoinAPI::signmessage (const std::string& bitcoinaddress, const std::string& message) {
410
421
string command = " signmessage" ;
411
422
Value params, result;
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ class BitcoinAPI
65
65
void keypoolrefill ();
66
66
bool settxfee (double amount);
67
67
double estimatefee (int blocks);
68
+ smartfee_t estimatesmartfee (int blocks);
68
69
69
70
std::string signmessage (const std::string& bitcoinaddress, const std::string& message);
70
71
bool verifymessage (const std::string& bitcoinaddress, const std::string& signature, const std::string& message);
@@ -83,7 +84,7 @@ class BitcoinAPI
83
84
84
85
std::vector<accountinfo_t > listreceivedbyaccount (int minconf = 1 , bool includeempty = false );
85
86
std::vector<addressinfo_t > listreceivedbyaddress (int minconf = 1 , bool includeempty = false );
86
-
87
+
87
88
gettransaction_t gettransaction (const std::string& tx, bool watch);
88
89
std::vector<transactioninfo_t > listtransactions ();
89
90
std::vector<transactioninfo_t > listtransactions (const std::string& account, int count = 10 , int from = 0 );
Original file line number Diff line number Diff line change 210
210
211
211
212
212
/* === Other === */
213
+
214
+ struct smartfee_t {
215
+ double feerate;
216
+ int blocks;
217
+ };
213
218
struct utxoinfo_t {
214
219
std::string bestblock;
215
220
int confirmations;
You can’t perform that action at this time.
0 commit comments