|
|
před 2 roky | |
|---|---|---|
| .. | ||
| .gitignore | před 2 roky | |
| README.md | před 2 roky | |
| config.toml | před 2 roky | |
| main.py | před 2 roky | |
| model.py | před 2 roky | |
| requirements.txt | před 2 roky | |
| rpc.py | před 2 roky | |
| scroll.py | před 2 roky | |
| view.py | před 2 roky | |
A simple tui to explore darkfi p2p network topology. Displays:
dnet is based on the design-pattern Model, View, Controller. We create
a logical seperation between the underlying data structure or Model;
the ui rendering aspect which is the View; and the Controller or game
engine that makes everything run.
Depending on your setup you may need to install a virtual environment for Python. Do so as follows:
% python -m venv python-env
% source python-env/bin/activate
Then install the requirements:
% pip install -r requirements.txt
Run dnet:
% python main.py
You will need to reactivate the venv in your current terminal session
each time you use dnet as follows:
% source python-env/bin/activate
If you don't require a venv, install the requirements and run dnet as follows:
% pip install -r requirements.txt
% python main.py
Navigate up and down using the arrow keys. Scroll the message log using
PageUp and PageDown. Type q to quit.
The dnet config file can be found in bin/dnet/config.toml. Enter the
RPC ports of the nodes you want to connect to and title them as you see
fit. The default config file uses localhost, but you can replace this
with hostnames or external IP addresses. You must also specify whether
it is a NORMAL or a LILITH node.
dnet creates a log file in bin/dnet/dnet.log. To see json data and
other debug info, tail the file like so:
tail -f dnet.log