pull/1184/head
Thomas Winget 4 years ago
parent e7689b40a7
commit 341d03bcf8

@ -15,8 +15,11 @@ def RemoveTmpDir(dirname):
print("calling rmdir -r %s" % dirname)
if (input("Is this ok? (y/n): ").lower().strip()[:1] == "y"):
rmtree(dirname, ignore_errors=True)
return True
else:
print("not removing dir %s because it doesn't start with /tmp/" % dirname)
return False
endpointName = "pyllarp"
@ -103,7 +106,8 @@ def AddClient(hive, index, netid="hive"):
def main(n_routers=10, n_clients=10):
pyllarp.EnableDebug()
running = True
RemoveTmpDir(tmpdir)
if not RemoveTmpDir(tmpdir):
return
def handle_sigint(sig, frame):
nonlocal running

@ -4,7 +4,7 @@
namespace tooling
{
PubIntroReceivedEvent::PubIntroReceivedEvent(const llarp::RouterID & ourRouter, const llarp::dht::Key_t & from, const llarp::dht::Key_t & location, uint64_t txid, uint64_t relayOrder) :
RouterEvent(ourRouter, false),
RouterEvent("DHT: PubIntroReceivedEvent", ourRouter, false),
From(from),
IntrosetLocation(location),
RelayOrder(relayOrder),
@ -13,7 +13,7 @@ namespace tooling
std::string PubIntroReceivedEvent::ToString() const
{
return "DhtPubIntroReceievedEvent on " + routerID.ShortString() + " from " + From.ToHex() + " location=" + IntrosetLocation.ToHex() + " order=" + std::to_string(RelayOrder) + " txid=" + std::to_string(TxID);
return RouterEvent::ToString() + "from " + From.ToHex() + " location=" + IntrosetLocation.ToHex() + " order=" + std::to_string(RelayOrder) + " txid=" + std::to_string(TxID);
}
}

@ -18,7 +18,7 @@ namespace tooling
result += eventType;
result += " [";
result += routerID.ShortString();
result += "] ";
result += "] -- ";
return result;
}

Loading…
Cancel
Save