mirror of https://github.com/oxen-io/lokinet
use Time_t
This commit is contained in:
parent
96c5553e34
commit
28561cd654
|
@ -50,7 +50,7 @@ namespace llarp
|
|||
, _dht(llarp_dht_context_new(this))
|
||||
, inbound_link_msg_parser(this)
|
||||
, _hiddenServiceContext(this)
|
||||
, _randomStartDelay(1000 * (llarp::randint() % 30) + 10)
|
||||
, _randomStartDelay(std::chrono::seconds((llarp::randint() % 30) + 10))
|
||||
{
|
||||
m_keyManager = std::make_shared< KeyManager >();
|
||||
|
||||
|
@ -117,7 +117,7 @@ namespace llarp
|
|||
if(not IsServiceNode())
|
||||
return;
|
||||
/// wait for random uptime
|
||||
if(Uptime() < _randomStartDelay)
|
||||
if(Uptime() < _randomStartDelay.count())
|
||||
return;
|
||||
_rcGossiper.GossipRC(rc);
|
||||
}
|
||||
|
|
|
@ -260,7 +260,7 @@ namespace llarp
|
|||
bool enableRPCServer = false;
|
||||
std::unique_ptr< rpc::Server > rpcServer;
|
||||
std::string rpcBindAddr = DefaultRPCBindAddr;
|
||||
const llarp_time_t _randomStartDelay;
|
||||
const Time_t _randomStartDelay;
|
||||
|
||||
/// lokid caller
|
||||
std::unique_ptr< rpc::Caller > rpcCaller;
|
||||
|
|
Loading…
Reference in New Issue