fix pybind layer

pull/1529/head
Jeff Becker 3 years ago
parent d112a50096
commit 1e58715e0b
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -7,10 +7,10 @@ namespace tooling
HiveContext::HiveContext(RouterHive* hive) : m_hive(hive)
{}
std::unique_ptr<llarp::AbstractRouter>
std::shared_ptr<llarp::AbstractRouter>
HiveContext::makeRouter(llarp_ev_loop_ptr netloop, std::shared_ptr<llarp::Logic> logic)
{
return std::make_unique<HiveRouter>(netloop, logic, makeVPNPlatform(), m_hive);
return std::make_shared<HiveRouter>(netloop, logic, makeVPNPlatform(), m_hive);
}
HiveRouter*

@ -11,7 +11,7 @@ namespace tooling
{
HiveContext(RouterHive* hive);
std::unique_ptr<llarp::AbstractRouter>
std::shared_ptr<llarp::AbstractRouter>
makeRouter(llarp_ev_loop_ptr netloop, std::shared_ptr<llarp::Logic> logic) override;
/// Get this context's router as a HiveRouter.

@ -7,9 +7,9 @@ namespace tooling
HiveRouter::HiveRouter(
llarp_ev_loop_ptr netloop,
std::shared_ptr<llarp::Logic> logic,
std::unique_ptr<llarp::vpn::Platform> plat,
std::shared_ptr<llarp::vpn::Platform> plat,
RouterHive* hive)
: Router(netloop, logic, std::move(plat)), m_hive(hive)
: Router(netloop, logic, plat), m_hive(hive)
{}
bool

@ -13,7 +13,7 @@ namespace tooling
explicit HiveRouter(
llarp_ev_loop_ptr netloop,
std::shared_ptr<llarp::Logic> logic,
std::unique_ptr<llarp::vpn::Platform> vpnPlatform,
std::shared_ptr<llarp::vpn::Platform> vpnPlatform,
RouterHive* hive);
virtual ~HiveRouter() = default;

@ -23,7 +23,7 @@ namespace tooling
opts.isRouter = isRouter;
Context_ptr context = std::make_shared<HiveContext>(this);
context->Configure(*config);
context->Configure(config);
context->Setup(opts);
auto routerId = llarp::RouterID(context->router->pubkey());

@ -99,7 +99,7 @@ namespace llarp
.def_property(
"lokidRPCAddr",
[](LokidConfig& self) { return self.lokidRPCAddr.full_address().c_str(); },
[](LokidConfig& self, std::string arg) { self.lokidRPCAddr = lokimq::address(arg); });
[](LokidConfig& self, std::string arg) { self.lokidRPCAddr = oxenmq::address(arg); });
py::class_<BootstrapConfig>(mod, "BootstrapConfig")
.def(py::init<>())

@ -11,9 +11,9 @@ namespace llarp
.def(
"FromHex",
[](RouterID* r, const std::string& hex) {
if (hex.size() != 2 * r->size() || !lokimq::is_hex(hex))
if (hex.size() != 2 * r->size() || !oxenmq::is_hex(hex))
throw std::runtime_error("FromHex requires a 64-digit hex string");
lokimq::from_hex(hex.begin(), hex.end(), r->data());
oxenmq::from_hex(hex.begin(), hex.end(), r->data());
})
.def("__repr__", &RouterID::ToString)
.def("__str__", &RouterID::ToString)

Loading…
Cancel
Save