1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00
lokinet/include/llarp/pathbuilder.hpp
Jeff Becker 5228a81bae
more refactor
get rid of C api
2018-08-30 14:48:43 -04:00

41 lines
852 B
C++

#ifndef LLARP_PATHBUILDER_HPP_
#define LLARP_PATHBUILDER_HPP_
#include <llarp/pathset.hpp>
namespace llarp
{
namespace path
{
struct Builder : public PathSet
{
struct llarp_router* router;
struct llarp_dht_context* dht;
llarp::SecretKey enckey;
size_t numHops;
/// construct
Builder(llarp_router* p_router, struct llarp_dht_context* p_dht,
size_t numPaths, size_t numHops);
virtual ~Builder();
virtual bool
SelectHop(llarp_nodedb* db, const RouterContact& prev, RouterContact& cur,
size_t hop);
virtual bool
ShouldBuildMore() const;
void
BuildOne();
void
ManualRebuild(size_t N);
virtual const byte_t*
GetTunnelEncryptionSecretKey() const;
};
} // namespace path
} // namespace llarp
#endif