at 23.11-pre 978 B view raw
1import ./make-test-python.nix ({ pkgs, ... }: { 2 name = "geth"; 3 meta = with pkgs.lib; { 4 maintainers = with maintainers; [bachp ]; 5 }; 6 7 nodes.machine = { ... }: { 8 services.geth."mainnet" = { 9 enable = true; 10 http = { 11 enable = true; 12 }; 13 }; 14 services.geth."testnet" = { 15 enable = true; 16 port = 30304; 17 network = "goerli"; 18 http = { 19 enable = true; 20 port = 18545; 21 }; 22 authrpc = { 23 enable = true; 24 port = 18551; 25 }; 26 }; 27 }; 28 29 testScript = '' 30 start_all() 31 32 machine.wait_for_unit("geth-mainnet.service") 33 machine.wait_for_unit("geth-testnet.service") 34 machine.wait_for_open_port(8545) 35 machine.wait_for_open_port(18545) 36 37 machine.succeed( 38 'geth attach --exec "eth.blockNumber" http://localhost:8545 | grep \'^0$\' ' 39 ) 40 41 machine.succeed( 42 'geth attach --exec "eth.blockNumber" http://localhost:18545 | grep \'^0$\' ' 43 ) 44 ''; 45})