diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-01-27 13:27:52 -0800 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-01-27 13:27:52 -0800 |
commit | 64774d0d4f552b2864abd969c6bc69c0ced3b2e1 (patch) | |
tree | 4bf3409fb359c6b0703e5c8ef7f54d8b0a601905 /world | |
parent | b88f5737337a978e9d610f6f24e8cd35078b184a (diff) | |
download | infinitytier-64774d0d4f552b2864abd969c6bc69c0ced3b2e1.tar.gz infinitytier-64774d0d4f552b2864abd969c6bc69c0ced3b2e1.zip |
Replace piecemeal designation of upstreams with the concept of moons, which is simpler and easier to use and inherits all the cool live update stuff of worlds (now called planets) and global roots.
Diffstat (limited to 'world')
-rw-r--r-- | world/mkworld.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/world/mkworld.cpp b/world/mkworld.cpp index 061d6341..2e9e621f 100644 --- a/world/mkworld.cpp +++ b/world/mkworld.cpp @@ -53,11 +53,12 @@ using namespace ZeroTier; class WorldMaker : public World { public: - static inline World make(uint64_t id,uint64_t ts,const C25519::Public &sk,const std::vector<World::Root> &roots,const C25519::Pair &signWith) + static inline World make(World::Type t,uint64_t id,uint64_t ts,const C25519::Public &sk,const std::vector<World::Root> &roots,const C25519::Pair &signWith) { WorldMaker w; w._id = id; w._ts = ts; + w._type = t; w._updateSigningKey = sk; w._roots = roots; @@ -139,7 +140,7 @@ int main(int argc,char **argv) fprintf(stderr,"INFO: generating and signing id==%llu ts==%llu"ZT_EOL_S,(unsigned long long)id,(unsigned long long)ts); - World nw = WorldMaker::make(id,ts,currentKP.pub,roots,previousKP); + World nw = WorldMaker::make(World::TYPE_PLANET,id,ts,currentKP.pub,roots,previousKP); Buffer<ZT_WORLD_MAX_SERIALIZED_LENGTH> outtmp; nw.serialize(outtmp,false); |