mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Return optional error from ApplyArgsManOptions
Also pass in a (for now unused) reference to the params. Both changes are needed for the next commit.
This commit is contained in:
parent
816ca01650
commit
fa468bdfb6
5 changed files with 21 additions and 4 deletions
|
|
@ -7,7 +7,13 @@
|
|||
#include <kernel/mempool_limits.h>
|
||||
#include <kernel/mempool_options.h>
|
||||
|
||||
#include <chainparams.h>
|
||||
#include <tinyformat.h>
|
||||
#include <util/system.h>
|
||||
#include <util/translation.h>
|
||||
|
||||
#include <chrono>
|
||||
#include <memory>
|
||||
|
||||
using kernel::MemPoolLimits;
|
||||
using kernel::MemPoolOptions;
|
||||
|
|
@ -25,7 +31,7 @@ void ApplyArgsManOptions(const ArgsManager& argsman, MemPoolLimits& mempool_limi
|
|||
}
|
||||
}
|
||||
|
||||
void ApplyArgsManOptions(const ArgsManager& argsman, MemPoolOptions& mempool_opts)
|
||||
std::optional<bilingual_str> ApplyArgsManOptions(const ArgsManager& argsman, const CChainParams& chainparams, MemPoolOptions& mempool_opts)
|
||||
{
|
||||
mempool_opts.check_ratio = argsman.GetIntArg("-checkmempool", mempool_opts.check_ratio);
|
||||
|
||||
|
|
@ -36,4 +42,6 @@ void ApplyArgsManOptions(const ArgsManager& argsman, MemPoolOptions& mempool_opt
|
|||
mempool_opts.full_rbf = argsman.GetBoolArg("-mempoolfullrbf", mempool_opts.full_rbf);
|
||||
|
||||
ApplyArgsManOptions(argsman, mempool_opts.limits);
|
||||
|
||||
return std::nullopt;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue