Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/chain.cpp
// Copyright (c) 2018 The Bitcoin Core developers | // Copyright (c) 2018 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include <interfaces/chain.h> | #include <interfaces/chain.h> | ||||
#include <chain.h> | #include <chain.h> | ||||
#include <chainparams.h> | #include <chainparams.h> | ||||
#include <net.h> | |||||
#include <policy/mempool.h> | #include <policy/mempool.h> | ||||
#include <primitives/block.h> | #include <primitives/block.h> | ||||
#include <primitives/blockhash.h> | #include <primitives/blockhash.h> | ||||
#include <sync.h> | #include <sync.h> | ||||
#include <threadsafety.h> | #include <threadsafety.h> | ||||
#include <txmempool.h> | #include <txmempool.h> | ||||
#include <util/system.h> | #include <util/system.h> | ||||
#include <validation.h> | #include <validation.h> | ||||
▲ Show 20 Lines • Show All 201 Lines • ▼ Show 20 Lines | public: | ||||
std::string unused_error_string; | std::string unused_error_string; | ||||
LOCK(::g_mempool.cs); | LOCK(::g_mempool.cs); | ||||
return ::g_mempool.CalculateMemPoolAncestors( | return ::g_mempool.CalculateMemPoolAncestors( | ||||
entry, ancestors, limit_ancestor_count, limit_ancestor_size, | entry, ancestors, limit_ancestor_count, limit_ancestor_size, | ||||
limit_descendant_count, limit_descendant_size, | limit_descendant_count, limit_descendant_size, | ||||
unused_error_string); | unused_error_string); | ||||
} | } | ||||
bool getPruneMode() override { return ::fPruneMode; } | bool getPruneMode() override { return ::fPruneMode; } | ||||
bool p2pEnabled() override { return g_connman != nullptr; } | |||||
}; | }; | ||||
} // namespace | } // namespace | ||||
std::unique_ptr<Chain> MakeChain() { | std::unique_ptr<Chain> MakeChain() { | ||||
return std::make_unique<ChainImpl>(); | return std::make_unique<ChainImpl>(); | ||||
} | } | ||||
} // namespace interfaces | } // namespace interfaces |