doc: Clarify the getmempoolinfo.loaded RPC field documentation

Also, clarify the LoadMempool doxygen.
This commit is contained in:
MarcoFalke 2023-04-13 10:26:17 +02:00
parent 6888886cec
commit fa8866990d
No known key found for this signature in database
4 changed files with 5 additions and 6 deletions

View file

@ -19,7 +19,6 @@
#include <util/time.h>
#include <validation.h>
#include <chrono>
#include <cstdint>
#include <cstdio>
#include <exception>

View file

@ -12,12 +12,12 @@ class CTxMemPool;
namespace kernel {
/** Dump the mempool to disk. */
/** Dump the mempool to a file. */
bool DumpMempool(const CTxMemPool& pool, const fs::path& dump_path,
fsbridge::FopenFn mockable_fopen_function = fsbridge::fopen,
bool skip_file_commit = false);
/** Load the mempool from disk. */
/** Import the file and attempt to add its contents to the mempool. */
bool LoadMempool(CTxMemPool& pool, const fs::path& load_path,
Chainstate& active_chainstate,
fsbridge::FopenFn mockable_fopen_function = fsbridge::fopen);

View file

@ -696,7 +696,7 @@ static RPCHelpMan getmempoolinfo()
RPCResult{
RPCResult::Type::OBJ, "", "",
{
{RPCResult::Type::BOOL, "loaded", "True if the mempool is fully loaded"},
{RPCResult::Type::BOOL, "loaded", "True if the initial load attempt of the persisted mempool finished"},
{RPCResult::Type::NUM, "size", "Current tx count"},
{RPCResult::Type::NUM, "bytes", "Sum of all virtual transaction sizes as defined in BIP 141. Differs from actual serialized size because witness data is discounted"},
{RPCResult::Type::NUM, "usage", "Total memory usage for the mempool"},

View file

@ -663,13 +663,13 @@ public:
void GetTransactionAncestry(const uint256& txid, size_t& ancestors, size_t& descendants, size_t* ancestorsize = nullptr, CAmount* ancestorfees = nullptr) const;
/**
* @returns true if we've made an attempt to load the mempool regardless of
* @returns true if an initial attempt to load the persisted mempool was made, regardless of
* whether the attempt was successful or not
*/
bool GetLoadTried() const;
/**
* Set whether or not we've made an attempt to load the mempool (regardless
* Set whether or not an initial attempt to load the persisted mempool was made (regardless
* of whether the attempt was successful or not)
*/
void SetLoadTried(bool load_tried);