simulation 1.0 KB

1234567891011121314151617181920212223
  1. // In a terminal start a seed node
  2. $ cargo +nightly run -- -v
  3. // In a new terminal start node 1
  4. $ cargo +nightly run -- -v --accept 0.0.0.0:11001 --slots 5 --seeds 127.0.0.1:9999 --rpc 127.0.0.1:6661 --external 127.0.0.1:11001
  5. // In a new terminal start node 2
  6. $ cargo +nightly run -- -v --accept 0.0.0.0:11002 --slots 5 --seeds 127.0.0.1:9999 --rpc 127.0.0.1:6662 --external 127.0.0.1:11002
  7. // In a new terminal start node 3
  8. $ cargo +nightly run -- -v --accept 0.0.0.0:11003 --slots 5 --seeds 127.0.0.1:9999 --rpc 127.0.0.1:6663 --external 127.0.0.1:11003
  9. // In a new terminal, telnet to one of the nodes and submit a tx json command
  10. $ telnet 127.0.0.1 6661
  11. json: {"jsonrpc": "2.0", "method": "receive_tx", "params": ["tx"], "id": 42}
  12. // In new terminal windows(one for each node), telnet rest nodes
  13. $ telnet 127.0.0.1 6661
  14. $ telnet 127.0.0.1 6662
  15. $ telnet 127.0.0.1 6663
  16. // verify they all hold the same tx by submiting the following json in each terminal
  17. json: {"jsonrpc": "2.0", "method": "get_tx_pool", "params": [], "id": 42}