Skip to content

Commit

Permalink
Merge pull request OpenBazaar#1294 from hoffmabc/add-seeds-help
Browse files Browse the repository at this point in the history
Add seeds help
  • Loading branch information
hoffmabc committed May 29, 2015
2 parents 16bd2ef + f3f6ffa commit 9df84ae
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion node/openbazaar.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ def usage():
openbazaar -d --dev-nodes 4 -j --server-ip 79.104.98.111 start
openbazaar --dev-mode -n 4 -i 79.104.98.111 start
openbazaar --server-ip 200.2.8.100 --server-port 12333 --disable-stun-check start
openbazaar --seeds seed.openbazaar.org:12345 start
openbazaar stop
OPTIONS
Expand Down Expand Up @@ -197,6 +198,9 @@ def usage():
--enable-ip-checker
Enable periodic IP address checking.
Useful in case you expect your IP to change rapidly.
-s, --seeds
Specify seed servers to bootstrap the network rather than use defaults
"""


Expand Down Expand Up @@ -256,6 +260,14 @@ def create_openbazaar_contexts(arguments, nat_status):
if arguments.log != log_path:
log_path = arguments.log

seed_tuples = []
for seed in arguments.seeds:
if not isinstance(seed, tuple):
seed_split = seed.split(':')
seed_tuples.append((seed_split[0], seed_split[1]))
else:
seed_tuples.append(seed)

# we return a list of a single element, a production node.
ob_ctxs.append(OpenBazaarContext(nat_status,
server_ip,
Expand All @@ -271,7 +283,7 @@ def create_openbazaar_contexts(arguments, nat_status):
arguments.bm_port,
arguments.mediator_port,
arguments.mediator,
arguments.seeds,
seed_tuples,
arguments.seed_mode,
arguments.dev_mode,
arguments.dev_nodes,
Expand Down

0 comments on commit 9df84ae

Please sign in to comment.