* rename NodeInfo field of Node from "data" to "info"
      (touches a lot of files)
  * update client to use gossip to find leader, a la drone
  * rework multinode scripts
      * move more stuff into rust
      * added usage to all
      * no more rsync unless you're a validator (TODO: whack that, too)
  * fullnode doesn't bail if drone isn't up yet, just keeps trying
  * drone doesn't bail if network isn't up yet, just keeps trying
		
	
		
			
				
	
	
		
			41 lines
		
	
	
		
			795 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			795 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/bash
 | |
| #
 | |
| # Starts an instance of solana-drone
 | |
| #
 | |
| here=$(dirname "$0")
 | |
| 
 | |
| # shellcheck source=multinode-demo/common.sh
 | |
| source "$here"/common.sh
 | |
| 
 | |
| usage() {
 | |
|   if [[ -n $1 ]]; then
 | |
|     echo "$*"
 | |
|     echo
 | |
|   fi
 | |
|   echo "usage: $0 [network entry point]"
 | |
|   echo
 | |
|   echo " Run an airdrop drone for the specified network"
 | |
|   echo
 | |
|   exit 1
 | |
| }
 | |
| 
 | |
| read -r _ leader_address shift < <(find_leader "${@:1:1}")
 | |
| shift "$shift"
 | |
| 
 | |
| [[ -f "$SOLANA_CONFIG_PRIVATE_DIR"/mint.json ]] || {
 | |
|   echo "$SOLANA_CONFIG_PRIVATE_DIR/mint.json not found, create it by running:"
 | |
|   echo
 | |
|   echo "  ${here}/setup.sh -t leader"
 | |
|   exit 1
 | |
| }
 | |
| 
 | |
| set -ex
 | |
| 
 | |
| trap 'kill "$pid" && wait "$pid"' INT TERM
 | |
| $solana_drone \
 | |
|   --keypair "$SOLANA_CONFIG_PRIVATE_DIR"/mint.json \
 | |
|   --network "$leader_address" \
 | |
|   > >($drone_logger) 2>&1 &
 | |
| pid=$!
 | |
| wait "$pid"
 |