fix: remove logger.error calls to avoid _log() error
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Node Failover Simulation / failover-test (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Integration Tests / test-service-integration (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Node Failover Simulation / failover-test (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled
Removed logger.error() calls from blockchain router to avoid 'Logger._log() got an unexpected keyword argument error'.
This commit is contained in:
@@ -51,10 +51,8 @@ async def blockchain_sync_status() -> dict[str, Any]:
|
||||
else:
|
||||
return {"status": "synced", "block": response.get("current_block", 0)}
|
||||
except NetworkError as e:
|
||||
logger.error(f"Blockchain sync status error: {e}")
|
||||
return {"status": "error", "error": f"RPC connection failed: {e}"}
|
||||
except Exception as e:
|
||||
logger.error(f"Blockchain sync status error: {e}")
|
||||
return {"status": "error", "error": "Failed to get sync status"}
|
||||
|
||||
|
||||
@@ -69,7 +67,6 @@ async def get_block(height: int) -> dict[str, Any]:
|
||||
response = client.get(f"{rpc_url}/rpc/blocks/{height}")
|
||||
return response
|
||||
except NetworkError as e:
|
||||
logger.error(f"Get block error: {e}")
|
||||
return {"status": "error", "error": f"RPC connection failed: {e}"}
|
||||
|
||||
|
||||
@@ -84,7 +81,6 @@ async def get_block_by_hash(block_hash: str) -> dict[str, Any]:
|
||||
response = client.get(f"{rpc_url}/rpc/blocks/hash/{block_hash}")
|
||||
return response
|
||||
except NetworkError as e:
|
||||
logger.error(f"Get block by hash error: {e}")
|
||||
return {"status": "error", "error": f"RPC connection failed: {e}"}
|
||||
|
||||
|
||||
@@ -99,7 +95,6 @@ async def get_transaction(tx_hash: str) -> dict[str, Any]:
|
||||
response = client.get(f"{rpc_url}/rpc/transactions/{tx_hash}")
|
||||
return response
|
||||
except NetworkError as e:
|
||||
logger.error(f"Get transaction error: {e}")
|
||||
return {"status": "error", "error": f"RPC connection failed: {e}"}
|
||||
|
||||
|
||||
@@ -114,7 +109,6 @@ async def get_account(address: str) -> dict[str, Any]:
|
||||
response = client.get(f"{rpc_url}/rpc/accounts/{address}")
|
||||
return response
|
||||
except NetworkError as e:
|
||||
logger.error(f"Get account error: {e}")
|
||||
return {"status": "error", "error": f"RPC connection failed: {e}"}
|
||||
|
||||
|
||||
@@ -134,7 +128,6 @@ async def get_validators() -> dict[str, Any]:
|
||||
"total": 1
|
||||
}
|
||||
except NetworkError as e:
|
||||
logger.error(f"Get validators error: {e}")
|
||||
return {"status": "error", "error": f"RPC connection failed: {e}"}
|
||||
|
||||
|
||||
@@ -156,7 +149,6 @@ async def get_supply() -> dict[str, Any]:
|
||||
"unit": "AIT"
|
||||
}
|
||||
except NetworkError as e:
|
||||
logger.error(f"Get supply error: {e}")
|
||||
return {"status": "error", "error": f"RPC connection failed: {e}"}
|
||||
|
||||
|
||||
@@ -175,5 +167,4 @@ async def get_state_dump() -> dict[str, Any]:
|
||||
"timestamp": response.get("timestamp", "")
|
||||
}
|
||||
except NetworkError as e:
|
||||
logger.error(f"Get state dump error: {e}")
|
||||
return {"status": "error", "error": f"RPC connection failed: {e}"}
|
||||
|
||||
Reference in New Issue
Block a user