jaros1 / Money-Network

Demo with complementary and alternative money. Implemented in ZeroNet and AngularJS. Focus on privacy, encryption, max data in client and min data on ZeroNet. Work in progress.
GNU General Public License v2.0
4 stars 4 forks source link

Add first hub #315

Closed jaros1 closed 6 years ago

jaros1 commented 6 years ago

Should add all known hubs to content.json files (MN and W2).

But problem with hubs without peers. Adding a hub without peer is OK in development and test but not OK for a normal first time visitor. User profile will be stored in an "inactive" hub and publish will fail.

Maybe only create user profile on a hub with peer. But number of peers is only returned from 1) ZeroFrame setSiteInfo (now only saving info about main site) and mergerSiteList. Both requires add site before getting peer info.

A workaround could be checking number of peer after adding a hub and keep adding hubs until finding a hub with peer > 0. Publish user content on a hub without peer will fail. A workaround could be moving user files to a hub with peer (if any). See also https://github.com/jaros1/Money-Network/issues/312 Publish failed - show number of peers

jaros1 commented 6 years ago

Better first hub choice in get_my_user_hub.step_3_find_user_hubs:

  1. priority. existing hub with peers. no problems
  2. priority. new hub. maybe or maybe not a hub with peers
  3. priority. existing hub without peers.publish user content will fail. Tested OK in "opera" and on zerogate.tk
jaros1 commented 6 years ago

todo:

Solve problem by adding more hubs / moving user data to a hub with more data / more peers