mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-13 01:10:24 +00:00
273270916e
This commit reflects changes to clang-format rules. Unfortunately, these rule changes create a massive change to the codebase, which causes an apparent rewrite of git history. Git blame's --ignore-rev flag can be used to ignore this commit when attempting to `git blame` some code.
35 lines
685 B
C++
35 lines
685 B
C++
#include <simulation/sim_context.hpp>
|
|
#include <llarp.hpp>
|
|
|
|
namespace llarp
|
|
{
|
|
namespace simulate
|
|
{
|
|
Simulation::Simulation() : m_CryptoManager(new sodium::CryptoLibSodium())
|
|
{
|
|
}
|
|
|
|
void
|
|
Simulation::NodeUp(llarp::Context*)
|
|
{
|
|
}
|
|
|
|
Node_ptr
|
|
Simulation::AddNode(const std::string& name)
|
|
{
|
|
auto itr = m_Nodes.find(name);
|
|
if (itr == m_Nodes.end())
|
|
{
|
|
itr = m_Nodes.emplace(name, std::make_shared<llarp::Context>(shared_from_this())).first;
|
|
}
|
|
return itr->second;
|
|
}
|
|
|
|
void
|
|
Simulation::DelNode(const std::string& name)
|
|
{
|
|
m_Nodes.erase(name);
|
|
}
|
|
} // namespace simulate
|
|
} // namespace llarp
|