File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -189,14 +189,16 @@ Using ``--preferred-node`` is a good way to ensure Trinity running in
189
189
Retrieving Chain information via web3
190
190
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
191
191
192
- While just running ``trinity `` will start syncing the chain just fine, it doesn't let us interact
193
- with the chain directly (apart from the JSON-RPC API). However, we can run Trinity with the
194
- ``console `` subcommand to get an interactive ``ipython `` shell that binds a
192
+ While just running ``trinity `` already causes the node to start syncing, it doesn't let us interact
193
+ with the chain directly (apart from the JSON-RPC API).
194
+
195
+ However, we can attach an interactive shell to a running Trinity instance with the
196
+ ``attach `` subcommand. The interactive ``ipython `` shell binds a
195
197
`web3 <http://web3py.readthedocs.io >`_ instance to the ``w3 `` variable.
196
198
197
199
.. code :: sh
198
200
199
- trinity console
201
+ trinity attach
200
202
201
203
Now that Trinity runs in an interactive shell mode, let's try to get some information about the
202
204
latest block by calling ``w3.eth.getBlock('latest') ``.
You can’t perform that action at this time.
0 commit comments