MetacoSA / NBitcoin

Comprehensive Bitcoin library for the .NET framework.
MIT License
1.85k stars 839 forks source link

How to find the peers in BTC blockchain? #1165

Closed zydjohnHotmail closed 1 year ago

zydjohnHotmail commented 1 year ago

Hello: I have been running a BTC full node in my PC using Bitcoin Core Version 22.0.0 binary, the binary was built by C++ package, it is working well. Since I don’t have experience with C++, I want to know if I can use Nbitcoin to make a C# Bitcoin full node, better to start with Bitcoin Testnet, not the main net first. From Bitcoin Core (V22.0.0), I can see there are always 10 peers connected with my node. As Nbitcoin is rather complicated, I want to know which functions in the Nbitcoin library are responsible to find and connect with other BTC full node? Do you have any pre-defined full node list or other ways to find which full nodes are online, so I can connect with? Just give me the C# files’ name, I can try to debug those files, so I can find how to find the full nodes online. Please advise, Thanks,

mjlamb commented 1 year ago

NBitcoin is a query and indexing library for the blockchain. The node discovery and connection is all handled with Bitcoin Core itself.

zydjohnHotmail commented 1 year ago

OK, thanks