* fixup! * fixups! * send the vote and count it * actually vote * test * Spelling fixes * Process the voting transaction in the leader's bank * Send tokens to the leader * Give leader tokens in more cases * Test for write_stage::leader_vote * Request airdrop inside fullnode and not the script * Change readme to indicate that drone should be up before leader And start drone before leader in snap scripts * Rename _kp => _keypair for keypairs and other review fixups * Remove empty else * tweak test_leader_vote numbers to be closer to testing 2/3 boundary * combine creating blob and transaction for leader/validator
35 lines
869 B
Bash
Executable File
35 lines
869 B
Bash
Executable File
#!/bin/bash -e
|
|
|
|
echo Stopping daemons
|
|
snapctl stop --disable solana.daemon-drone
|
|
snapctl stop --disable solana.daemon-leader
|
|
snapctl stop --disable solana.daemon-validator
|
|
|
|
mode="$(snapctl get mode)"
|
|
if [[ -z "$mode" ]]; then
|
|
exit 0
|
|
fi
|
|
|
|
ip_address_arg=-p # Use public IP address (TODO: make this configurable?)
|
|
num_tokens="$(snapctl get num-tokens)"
|
|
|
|
case $mode in
|
|
leader+drone)
|
|
$SNAP/bin/setup.sh ${num_tokens:+-n $num_tokens} ${ip_address_arg} -t leader
|
|
snapctl start --enable solana.daemon-drone
|
|
snapctl start --enable solana.daemon-leader
|
|
;;
|
|
leader)
|
|
$SNAP/bin/setup.sh ${num_tokens:+-n $num_tokens} ${ip_address_arg} -t leader
|
|
snapctl start --enable solana.daemon-leader
|
|
;;
|
|
validator)
|
|
$SNAP/bin/setup.sh ${ip_address_arg} -t validator
|
|
snapctl start --enable solana.daemon-validator
|
|
;;
|
|
*)
|
|
echo "Error: Unknown mode: $mode"
|
|
exit 1
|
|
;;
|
|
esac
|