#!/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."