Only accept world updates from upstreams.

This commit is contained in:
Adam Ierymenko 2017-02-13 09:46:34 -08:00
parent e6840a1863
commit e4b6611201
3 changed files with 33 additions and 9 deletions

View file

@ -215,6 +215,20 @@ public:
return _moons;
}
/**
* @return Moon IDs we are waiting for from seeds
*/
inline std::vector<uint64_t> moonsWanted() const
{
Mutex::Lock _l(_upstreams_m);
std::vector<uint64_t> mw;
for(std::vector< std::pair<uint64_t,Address> >::const_iterator s(_moonSeeds.begin());s!=_moonSeeds.end();++s) {
if (std::find(mw.begin(),mw.end(),s->first) == mw.end())
mw.push_back(s->first);
}
return mw;
}
/**
* @return Current planet
*/