31 lines
1.0 KiB
Bash
31 lines
1.0 KiB
Bash
#!/bin/bash
|
|
|
|
#rpc=https://go.getblock.io/61bed5f600ab47ff903baacab0e37c36
|
|
#rpc=https://api.mainnet-beta.solana.com
|
|
|
|
# 定义RPC URL数组
|
|
rpcurls=(https://prettiest-multi-scion.solana-mainnet.quiknode.pro/879eb32f3cd556cfff80973ff6a51b9e8b7a81ec/ https://silent-tiniest-diamond.solana-mainnet.quiknode.pro/fcef276a3d99aa044e9d7d7193aced24563de630/)
|
|
|
|
for keypair in *.json;
|
|
do
|
|
# 随机选择一个RPC URL
|
|
index=$((RANDOM % ${#rpcurls[@]}))
|
|
rpc=${rpcurls[$index]}
|
|
echo "选中rpc=$rpc"
|
|
|
|
screen -dmS mining_$keypair bash -c "
|
|
while true; do
|
|
if [ -f rpc_config ]; then
|
|
source rpc_config
|
|
fi
|
|
echo \"Starting indefinite ore mining iteration with $keypair....\"
|
|
nice -n 2 ./ore --rpc $rpc --keypair ./$keypair --priority-fee 500000 mine --threads 2
|
|
#ore --rpc $rpc --keypair ./$keypair --priority-fee 1000000 mine --threads 16 &
|
|
#sleep 5
|
|
#ore --rpc $rpc --keypair ./$keypair --priority-fee 1000000 mine --threads 16 &
|
|
#wait
|
|
done
|
|
"
|
|
# exit
|
|
done
|