diff options
author | MacroFake <falke.marco@gmail.com> | 2022-07-20 15:48:52 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-08-02 15:21:50 +0200 |
commit | fa468bdfb62dec286cb977db78d3e47b64dafeba (patch) | |
tree | cb9aef62e507e26226dc7d04d06a3f7b83f497ea /src/init.cpp | |
parent | 816ca01650f4cc66a61ac2f9b0f8b74cd9cd0cf8 (diff) | |
download | bitcoin-fa468bdfb62dec286cb977db78d3e47b64dafeba.tar.xz |
Return optional error from ApplyArgsManOptions
Also pass in a (for now unused) reference to the params.
Both changes are needed for the next commit.
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp index a94bbe6460..9a3c70abbd 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1418,7 +1418,9 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info) .estimator = node.fee_estimator.get(), .check_ratio = chainparams.DefaultConsistencyChecks() ? 1 : 0, }; - ApplyArgsManOptions(args, mempool_opts); + if (const auto err{ApplyArgsManOptions(args, chainparams, mempool_opts)}) { + return InitError(*err); + } mempool_opts.check_ratio = std::clamp<int>(mempool_opts.check_ratio, 0, 1'000'000); int64_t descendant_limit_bytes = mempool_opts.limits.descendant_size_vbytes * 40; |