block-core / blockcore

Open source .NET Core Bitcoin based blockchain node in C#
https://www.blockcore.net
219 stars 90 forks source link

Which functions are used to discover peers? #444

Open zydjohnHotmail opened 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 this repo. 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. I want to know which functions in the repo 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,

dangershony commented 1 year ago

Yes you can run a Bitcoin fullnode. Just execute the command dotner run --chain=BTC -test in the Blockcore.Node project

There are RPC and API calls available, you'll the hhtp location on startup

Yeah it's possible to see connected nodes and even try to discover new nodes.

miladsoft commented 1 year ago

Yes you can run a Bitcoin fullnode. Just execute the command dotner run --chain=BTC -test in the Blockcore.Node project

There are RPC and API calls available, you'll the hhtp location on startup

Yeah it's possible to see connected nodes and even try to discover new nodes.

dotnet run --chain=BTC -test