distinguish between seeds and manual peers in the config/flags

- we only use seeds if we can’t connect to peers in the addrbook.
- we always connect to nodes given in config/flags

Refs #864
This commit is contained in:
Anton Kaliaev
2018-01-09 16:03:24 -06:00
parent 179d6062e4
commit 28fc15028a
28 changed files with 112 additions and 107 deletions
+5 -5
View File
@@ -270,14 +270,14 @@ For instance,
::
tendermint node --p2p.seeds "1.2.3.4:46656,5.6.7.8:46656"
tendermint node --p2p.manual_peers "1.2.3.4:46656,5.6.7.8:46656"
Alternatively, you can use the ``/dial_seeds`` endpoint of the RPC to
Alternatively, you can use the ``/dial_manual_peers`` endpoint of the RPC to
specify peers for a running node to connect to:
::
curl --data-urlencode "seeds=[\"1.2.3.4:46656\",\"5.6.7.8:46656\"]" localhost:46657/dial_seeds
curl --data-urlencode "manual_peers=[\"1.2.3.4:46656\",\"5.6.7.8:46656\"]" localhost:46657/dial_manual_peers
Additionally, the peer-exchange protocol can be enabled using the
``--pex`` flag, though this feature is `still under
@@ -290,7 +290,7 @@ Adding a Non-Validator
Adding a non-validator is simple. Just copy the original
``genesis.json`` to ``~/.tendermint`` on the new machine and start the
node, specifying seeds as necessary. If no seeds are specified, the node
node, specifying manual_peers as necessary. If no manual_peers are specified, the node
won't make any blocks, because it's not a validator, and it won't hear
about any blocks, because it's not connected to the other peer.
@@ -363,7 +363,7 @@ and the new ``priv_validator.json`` to the ``~/.tendermint`` on a new
machine.
Now run ``tendermint node`` on both machines, and use either
``--p2p.seeds`` or the ``/dial_seeds`` to get them to peer up. They
``--p2p.manual_peers`` or the ``/dial_manual_peers`` to get them to peer up. They
should start making blocks, and will only continue to do so as long as
both of them are online.