How to Check the Number of Peers the Tron Node is Connected to?
To check the number of peers your Tron node is connected to, you can use either the Tron CLI command or the API. Here’s how you can do it using both methods:
Using Tron CLI: Open your terminal or command prompt and run the following command:
1 | tron-cli peer |
tron-cli peer
This command will display information about the peers your node is connected to, including their IP addresses and connection status. You can check the count of peers listed to determine the number of connections.
Using the API: You can also retrieve peer information programmatically by making an API call to your Tron node. Here’s an example of how to do it using cURL:
1 | curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"tron_getNodeInfo","params":[],"id":1}' http://YOUR_NODE_IP:PORT/wallet |
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"tron_getNodeInfo","params":[],"id":1}' http://YOUR_NODE_IP:PORT/wallet
Replace YOUR_NODE_IP with the IP address of your Tron node and PORT with the corresponding API port. This API call will return detailed information about your node, including the number of connected peers.
By using either the CLI or API method, you can determine the number of peers your Tron node is connected to and verify that it is actively participating in the Tron network.
Tron Blockchain
- TRON Blockchain: How to Send the USDT (TRC-20) Transacton using Python tronpy?
- How to Get Balance of TRX or USDT/USDD/USDC (TRC-20) Smart Contract Tokens on TRON Blockchain?
- Function to Return the USDT/USDD/USDC Contract Address on Tron Blockchain (Main Net, Nile, Shasta)
- How to Send/Transfer USDT/USDD/USDC on Tron Blockchain using Tronweb?
- Javascript Function to Send Trx on Tron Blockchain based on TronWeb
- How to Generate an Account on Tron Blockchain using Python SDK?
- How to Claim the Witness (Super Representative) Voting Rewards on Tron Blockchain using Node Js (Javascript)?
- Automate Freeze Balance on Tron Blockchain using NodeJs with TronWeb/TronGrid
- Python Tool of Base58 Decode Check
- TRON Blockchain: How to Check the Number of Peers the Tron Node is Connected to?
- TRON Blockchain: How to Check If a Node is synchronized and Fully Functional?
- How to Activate a TRON (TRX) Blockchain Wallet Address?
- Delayed Swap due to Numeric Underflow Bug by using Tron’s triggerSmartContract Method
–EOF (The Ultimate Computing & Technology Blog) —
loading...
Last Post: TRON Blockchain: How to Check If a Node is synchronized and Fully Functional?
Next Post: Azure Billing: How to Update the "Sold To" Address?