Files
scripts/MINE/rin/test_pool_connections.sh
2025-09-02 12:04:16 +03:00

70 lines
2.0 KiB
Bash
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Test different mining pool connection methods
echo "=== Testing Mining Pool Connection Methods ==="
echo ""
# Kill any existing processes
./MINE/rin/kill_stratum_proxy.sh
echo "🚀 Starting mining pool..."
./MINE/rin/start_mining_pool.sh &
POOL_PID=$!
echo ""
echo "⏳ Waiting for pool to start..."
sleep 5
echo ""
echo "🧪 Testing different connection methods:"
echo ""
echo "1⃣ Test 1: Address as username"
echo "Command: ./cpuminer -a rinhash -o stratum+tcp://127.0.0.1:3333 -u rin1qahvvv9d5f3443wtckeqavwp9950wacxfmwv20q -p x -t 2"
echo "Expected: Pool should recognize this as a RinCoin address"
echo ""
echo "2⃣ Test 2: Address.workername format"
echo "Command: ./cpuminer -a rinhash -o stratum+tcp://127.0.0.1:3333 -u rin1qahvvv9d5f3443wtckeqavwp9950wacxfmwv20q.worker1 -p x -t 2"
echo "Expected: Pool should recognize address and worker separately"
echo ""
echo "3⃣ Test 3: Traditional username"
echo "Command: ./cpuminer -a rinhash -o stratum+tcp://127.0.0.1:3333 -u user.worker -p x -t 2"
echo "Expected: Pool should use default pool address for rewards"
echo ""
echo "📊 Pool Status:"
echo "Web Dashboard: http://127.0.0.1:8080"
echo "Pool Address: rin1qahvvv9d5f3443wtckeqavwp9950wacxfmwv20q"
echo ""
echo "Press Enter to run test 1..."
read
echo "Running Test 1..."
timeout 10s ./cpuminer -a rinhash -o stratum+tcp://127.0.0.1:3333 -u rin1qahvvv9d5f3443wtckeqavwp9950wacxfmwv20q -p x -t 2
echo ""
echo "Press Enter to run test 2..."
read
echo "Running Test 2..."
timeout 10s ./cpuminer -a rinhash -o stratum+tcp://127.0.0.1:3333 -u rin1qahvvv9d5f3443wtckeqavwp9950wacxfmwv20q.worker1 -p x -t 2
echo ""
echo "Press Enter to run test 3..."
read
echo "Running Test 3..."
timeout 10s ./cpuminer -a rinhash -o stratum+tcp://127.0.0.1:3333 -u user.worker -p x -t 2
echo ""
echo "🧹 Cleaning up..."
kill $POOL_PID 2>/dev/null
./MINE/rin/kill_stratum_proxy.sh
echo ""
echo "✅ Test complete! Check the pool logs above to see how each connection was handled."