Run A Local Test Network
This page guide you to run fakenet (private testing network) with N local nodes, primarily for testing/benchmarking purposes.
Download go-u2u
Please check out and clone go-u2u source code:
Scripts
Scripts to run fakenet are located at demo
folder, it contains these scripts:
start network:
./start.sh
;stop network:
./stop.sh
;clean data and logs:
./clean.sh
;
You can specify number of genesis validators by setting N environment variable.
Balance transfer example
from demo/
dir
Start network:
Attach js-console to running node0:
Check the balance to ensure that node0 has something to transfer (node0 js-console):
output shows the balance value:
Get node1 address:
output shows address:
Transfer some amount from node0 to node1 address as receiver (node0 js-console):
output shows unique hash of the outgoing transaction:
Check the transaction status by its unique hash (js-console):
output shows number of block, transaction was included in:
As soon as transaction is included into a block you will see new balance of both node addresses:
outputs:
Last updated