Add src/node/* code to node:: namespace

This commit is contained in:
Russell Yanofsky
2021-11-12 10:06:00 -05:00
parent 4ada74206a
commit 90fc8b089d
77 changed files with 283 additions and 61 deletions

View File

@@ -249,8 +249,8 @@ public:
bool isInitialBlockDownload() override {
return chainman().ActiveChainstate().IsInitialBlockDownload();
}
bool getReindex() override { return ::fReindex; }
bool getImporting() override { return ::fImporting; }
bool getReindex() override { return node::fReindex; }
bool getImporting() override { return node::fImporting; }
void setNetworkActive(bool active) override
{
if (m_context->connman) {
@@ -649,9 +649,9 @@ public:
bool havePruned() override
{
LOCK(cs_main);
return ::fHavePruned;
return node::fHavePruned;
}
bool isReadyToBroadcast() override { return !::fImporting && !::fReindex && !isInitialBlockDownload(); }
bool isReadyToBroadcast() override { return !node::fImporting && !node::fReindex && !isInitialBlockDownload(); }
bool isInitialBlockDownload() override {
return chainman().ActiveChainstate().IsInitialBlockDownload();
}
@@ -729,6 +729,6 @@ public:
} // namespace node
namespace interfaces {
std::unique_ptr<Node> MakeNode(NodeContext& context) { return std::make_unique<node::NodeImpl>(context); }
std::unique_ptr<Chain> MakeChain(NodeContext& context) { return std::make_unique<node::ChainImpl>(context); }
std::unique_ptr<Node> MakeNode(node::NodeContext& context) { return std::make_unique<node::NodeImpl>(context); }
std::unique_ptr<Chain> MakeChain(node::NodeContext& context) { return std::make_unique<node::ChainImpl>(context); }
} // namespace interfaces