Peers are now dumped on shutdown in a persistence cache and reloaded on startup, which is good enough for clients right now. Supernodes will get something else for long-term authoritative identity caching.

This commit is contained in:
Adam Ierymenko 2013-10-21 11:15:47 -04:00
parent 6e217dfcb0
commit 40e4f39181
6 changed files with 113 additions and 4 deletions

View file

@ -37,7 +37,7 @@
#include "Packet.hpp"
#include "Buffer.hpp"
#define ZT_NETWORK_CERT_WRITE_BUF_SIZE 524288
#define ZT_NETWORK_CERT_WRITE_BUF_SIZE 131072
namespace ZeroTier {
@ -324,6 +324,7 @@ void Network::_dumpMulticastCerts()
if (!mcdb)
return;
if (fwrite("ZTMCD0",6,1,mcdb) != 1) {
fclose(mcdb);
Utils::rm(mcdbPath);
return;
}