Bitcoin Core
31.1.0
P2P Digital Currency
Toggle main menu visibility
Loading...
Searching...
No Matches
src
node
mempool_persist.h
Go to the documentation of this file.
1
// Copyright (c) 2022-present The Bitcoin Core developers
2
// Distributed under the MIT software license, see the accompanying
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5
#ifndef BITCOIN_NODE_MEMPOOL_PERSIST_H
6
#define BITCOIN_NODE_MEMPOOL_PERSIST_H
7
8
#include <
util/fs.h
>
9
10
class
Chainstate
;
11
class
CTxMemPool
;
12
13
namespace
node
{
14
16
bool
DumpMempool
(
const
CTxMemPool& pool,
const
fs::path& dump_path,
17
fsbridge::FopenFn
mockable_fopen_function =
fsbridge::fopen
,
18
bool
skip_file_commit =
false
);
19
20
struct
ImportMempoolOptions
{
21
fsbridge::FopenFn
mockable_fopen_function
{
fsbridge::fopen
};
22
bool
use_current_time
{
false
};
23
bool
apply_fee_delta_priority
{
true
};
24
bool
apply_unbroadcast_set
{
true
};
25
};
26
27
bool
LoadMempool
(
CTxMemPool
& pool,
const
fs::path& load_path,
28
Chainstate
& active_chainstate,
29
ImportMempoolOptions&& opts);
30
31
}
// namespace node
32
33
34
#endif
// BITCOIN_NODE_MEMPOOL_PERSIST_H
CTxMemPool
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
Definition
txmempool.h:187
Chainstate
Chainstate stores and provides an API to update our local knowledge of the current best chain.
Definition
validation.h:551
fs.h
fsbridge::fopen
FILE * fopen(const fs::path &p, const char *mode)
Definition
fs.cpp:25
fsbridge::FopenFn
std::function< FILE *(const fs::path &, const char *)> FopenFn
Definition
fs.h:192
node
Definition
messages.h:21
node::DumpMempool
bool DumpMempool(const CTxMemPool &pool, const fs::path &dump_path, FopenFn mockable_fopen_function, bool skip_file_commit)
Dump the mempool to a file.
Definition
mempool_persist.cpp:153
node::LoadMempool
bool LoadMempool(CTxMemPool &pool, const fs::path &load_path, Chainstate &active_chainstate, ImportMempoolOptions &&opts)
Import the file and attempt to add its contents to the mempool.
Definition
mempool_persist.cpp:43
node::ImportMempoolOptions
Definition
mempool_persist.h:20
node::ImportMempoolOptions::apply_fee_delta_priority
bool apply_fee_delta_priority
Definition
mempool_persist.h:23
node::ImportMempoolOptions::use_current_time
bool use_current_time
Definition
mempool_persist.h:22
node::ImportMempoolOptions::mockable_fopen_function
fsbridge::FopenFn mockable_fopen_function
Definition
mempool_persist.h:21
node::ImportMempoolOptions::apply_unbroadcast_set
bool apply_unbroadcast_set
Definition
mempool_persist.h:24
Generated on
for Bitcoin Core by
1.17.0