fix: Add debugging to get_wallet_address to diagnose CLI failure
All checks were successful
Blockchain Synchronization Verification / sync-verification (push) Successful in 3s
Cross-Node Transaction Testing / transaction-test (push) Successful in 9s
Deploy to Testnet / deploy-testnet (push) Successful in 1m3s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 2s
P2P Network Verification / p2p-verification (push) Successful in 2s
Deploy to Testnet / notify-deployment (push) Successful in 1s
All checks were successful
Blockchain Synchronization Verification / sync-verification (push) Successful in 3s
Cross-Node Transaction Testing / transaction-test (push) Successful in 9s
Deploy to Testnet / deploy-testnet (push) Successful in 1m3s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 2s
P2P Network Verification / p2p-verification (push) Successful in 2s
Deploy to Testnet / notify-deployment (push) Successful in 1s
- Check if CLI exists and is executable - Capture exit code and output from wallet address command - Log warning with exit code and output when command fails - Helps diagnose why wallet address retrieval fails in CI
This commit is contained in:
@@ -74,12 +74,24 @@ create_test_wallet() {
|
||||
# Get wallet address
|
||||
get_wallet_address() {
|
||||
local wallet_name="$1"
|
||||
# Try different wallet address command syntaxes
|
||||
local address=$(${CLI_PATH} wallet address --name "${wallet_name}" 2>/dev/null || echo "")
|
||||
if [ -z "$address" ]; then
|
||||
# Try alternative syntax
|
||||
address=$(${CLI_PATH} wallet list --name "${wallet_name}" 2>/dev/null | grep -o "ait1[a-z0-9]*" | head -1 || echo "")
|
||||
|
||||
# Check if CLI exists and is executable
|
||||
if [ ! -x "${CLI_PATH}" ]; then
|
||||
log_error "CLI not found or not executable: ${CLI_PATH}"
|
||||
echo ""
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Try different wallet address command syntaxes
|
||||
local address=$(${CLI_PATH} wallet address --name "${wallet_name}" 2>&1)
|
||||
local exit_code=$?
|
||||
|
||||
if [ $exit_code -ne 0 ] || [ -z "$address" ]; then
|
||||
log_warning "wallet address command failed (exit code: ${exit_code}, output: ${address})"
|
||||
# Try alternative syntax
|
||||
address=$(${CLI_PATH} wallet list --name "${wallet_name}" 2>&1 | grep -o "ait1[a-z0-9]*" | head -1 || echo "")
|
||||
fi
|
||||
|
||||
echo "$address"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user