|
16 | 16 | #include <univalue.h>
|
17 | 17 | #include <validation.h>
|
18 | 18 |
|
19 |
| -static std::vector<RPCResult> MempoolEntryDescription() { return { |
| 19 | +static std::vector<RPCResult> MempoolEntryDescription() |
| 20 | +{ |
| 21 | + return { |
20 | 22 | RPCResult{RPCResult::Type::NUM, "vsize", "virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted."},
|
21 | 23 | RPCResult{RPCResult::Type::NUM, "weight", "transaction weight as defined in BIP 141."},
|
22 | 24 | RPCResult{RPCResult::Type::STR_AMOUNT, "fee", /*optional=*/true,
|
@@ -50,7 +52,8 @@ static std::vector<RPCResult> MempoolEntryDescription() { return {
|
50 | 52 | {RPCResult{RPCResult::Type::STR_HEX, "transactionid", "child transaction id"}}},
|
51 | 53 | RPCResult{RPCResult::Type::BOOL, "bip125-replaceable", "Whether this transaction could be replaced due to BIP125 (replace-by-fee)"},
|
52 | 54 | RPCResult{RPCResult::Type::BOOL, "unbroadcast", "Whether this transaction is currently unbroadcast (initial broadcast not yet acknowledged by any peers)"},
|
53 |
| -};} |
| 55 | + }; |
| 56 | +} |
54 | 57 |
|
55 | 58 | static void entryToJSON(const CTxMemPool& pool, UniValue& info, const CTxMemPoolEntry& e) EXCLUSIVE_LOCKS_REQUIRED(pool.cs)
|
56 | 59 | {
|
@@ -164,7 +167,7 @@ UniValue MempoolToJSON(const CTxMemPool& pool, bool verbose, bool include_mempoo
|
164 | 167 | }
|
165 | 168 | }
|
166 | 169 |
|
167 |
| -RPCHelpMan getrawmempool() |
| 170 | +static RPCHelpMan getrawmempool() |
168 | 171 | {
|
169 | 172 | return RPCHelpMan{"getrawmempool",
|
170 | 173 | "\nReturns all transaction ids in memory pool as a json array of string transaction ids.\n"
|
@@ -214,7 +217,7 @@ RPCHelpMan getrawmempool()
|
214 | 217 | };
|
215 | 218 | }
|
216 | 219 |
|
217 |
| -RPCHelpMan getmempoolancestors() |
| 220 | +static RPCHelpMan getmempoolancestors() |
218 | 221 | {
|
219 | 222 | return RPCHelpMan{"getmempoolancestors",
|
220 | 223 | "\nIf txid is in the mempool, returns all in-mempool ancestors.\n",
|
@@ -278,7 +281,7 @@ RPCHelpMan getmempoolancestors()
|
278 | 281 | };
|
279 | 282 | }
|
280 | 283 |
|
281 |
| -RPCHelpMan getmempooldescendants() |
| 284 | +static RPCHelpMan getmempooldescendants() |
282 | 285 | {
|
283 | 286 | return RPCHelpMan{"getmempooldescendants",
|
284 | 287 | "\nIf txid is in the mempool, returns all in-mempool descendants.\n",
|
@@ -343,7 +346,7 @@ RPCHelpMan getmempooldescendants()
|
343 | 346 | };
|
344 | 347 | }
|
345 | 348 |
|
346 |
| -RPCHelpMan getmempoolentry() |
| 349 | +static RPCHelpMan getmempoolentry() |
347 | 350 | {
|
348 | 351 | return RPCHelpMan{"getmempoolentry",
|
349 | 352 | "\nReturns mempool data for given transaction\n",
|
@@ -394,7 +397,7 @@ UniValue MempoolInfoToJSON(const CTxMemPool& pool)
|
394 | 397 | return ret;
|
395 | 398 | }
|
396 | 399 |
|
397 |
| -RPCHelpMan getmempoolinfo() |
| 400 | +static RPCHelpMan getmempoolinfo() |
398 | 401 | {
|
399 | 402 | return RPCHelpMan{"getmempoolinfo",
|
400 | 403 | "\nReturns details on the active state of the TX memory pool.\n",
|
@@ -423,7 +426,7 @@ RPCHelpMan getmempoolinfo()
|
423 | 426 | };
|
424 | 427 | }
|
425 | 428 |
|
426 |
| -RPCHelpMan savemempool() |
| 429 | +static RPCHelpMan savemempool() |
427 | 430 | {
|
428 | 431 | return RPCHelpMan{"savemempool",
|
429 | 432 | "\nDumps the mempool to disk. It will fail until the previous dump is fully loaded.\n",
|
|
0 commit comments