aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2022-03-24 08:25:47 +0100
committerMarcoFalke <falke.marco@gmail.com>2022-03-24 08:21:32 +0100
commitfa0f666dd7b55a5a0250c5e35d2c3dfd565463b7 (patch)
tree620fdfdfd8c6e083121e490e589e1c9b34551935 /src/rpc
parent98e9d8e8e2e3e65e6f1e14be26457a9f9090c092 (diff)
style: Add static keyword where possible in rpc/mempool
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/mempool.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/rpc/mempool.cpp b/src/rpc/mempool.cpp
index bc7ef0c08e..358aa5288c 100644
--- a/src/rpc/mempool.cpp
+++ b/src/rpc/mempool.cpp
@@ -16,7 +16,9 @@
#include <univalue.h>
#include <validation.h>
-static std::vector<RPCResult> MempoolEntryDescription() { return {
+static std::vector<RPCResult> MempoolEntryDescription()
+{
+ return {
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."},
RPCResult{RPCResult::Type::NUM, "weight", "transaction weight as defined in BIP 141."},
RPCResult{RPCResult::Type::STR_AMOUNT, "fee", /*optional=*/true,
@@ -50,7 +52,8 @@ static std::vector<RPCResult> MempoolEntryDescription() { return {
{RPCResult{RPCResult::Type::STR_HEX, "transactionid", "child transaction id"}}},
RPCResult{RPCResult::Type::BOOL, "bip125-replaceable", "Whether this transaction could be replaced due to BIP125 (replace-by-fee)"},
RPCResult{RPCResult::Type::BOOL, "unbroadcast", "Whether this transaction is currently unbroadcast (initial broadcast not yet acknowledged by any peers)"},
-};}
+ };
+}
static void entryToJSON(const CTxMemPool& pool, UniValue& info, const CTxMemPoolEntry& e) EXCLUSIVE_LOCKS_REQUIRED(pool.cs)
{
@@ -164,7 +167,7 @@ UniValue MempoolToJSON(const CTxMemPool& pool, bool verbose, bool include_mempoo
}
}
-RPCHelpMan getrawmempool()
+static RPCHelpMan getrawmempool()
{
return RPCHelpMan{"getrawmempool",
"\nReturns all transaction ids in memory pool as a json array of string transaction ids.\n"
@@ -214,7 +217,7 @@ RPCHelpMan getrawmempool()
};
}
-RPCHelpMan getmempoolancestors()
+static RPCHelpMan getmempoolancestors()
{
return RPCHelpMan{"getmempoolancestors",
"\nIf txid is in the mempool, returns all in-mempool ancestors.\n",
@@ -278,7 +281,7 @@ RPCHelpMan getmempoolancestors()
};
}
-RPCHelpMan getmempooldescendants()
+static RPCHelpMan getmempooldescendants()
{
return RPCHelpMan{"getmempooldescendants",
"\nIf txid is in the mempool, returns all in-mempool descendants.\n",
@@ -343,7 +346,7 @@ RPCHelpMan getmempooldescendants()
};
}
-RPCHelpMan getmempoolentry()
+static RPCHelpMan getmempoolentry()
{
return RPCHelpMan{"getmempoolentry",
"\nReturns mempool data for given transaction\n",
@@ -394,7 +397,7 @@ UniValue MempoolInfoToJSON(const CTxMemPool& pool)
return ret;
}
-RPCHelpMan getmempoolinfo()
+static RPCHelpMan getmempoolinfo()
{
return RPCHelpMan{"getmempoolinfo",
"\nReturns details on the active state of the TX memory pool.\n",
@@ -423,7 +426,7 @@ RPCHelpMan getmempoolinfo()
};
}
-RPCHelpMan savemempool()
+static RPCHelpMan savemempool()
{
return RPCHelpMan{"savemempool",
"\nDumps the mempool to disk. It will fail until the previous dump is fully loaded.\n",