Bitcoin full node and query server

Oct 22, 2024

View in context in the libbitcoin Slack #general mirror.

Дмитрий Дмитриевич17:49
// Single Outbound Channel. bc::network::settings settings(bc::config::settings::mainnet); settings.seeds.clear(); settings.seeds.push_back({ "seed.bitcoin.wiz.biz",8333 }); settings.seeds.push_back({ "dnsseed.bitcoin.dashjr.org",8333 }); settings.seeds.push_back({ "seed.btc.petertodd.org",8333 }); settings.inbound_connections = 0; // default setting = 0. settings.outbound_connections = 2; // default setting = 8. settings.host_pool_capacity = 100; // default setting = 0. settings.threads = 3; // default setting = 0. settings.services = bc::message::version::service::none; // default none.
5 replies · evoskuil, Дмитрий Дмитриевич · last Oct 23, 2024
evoskuil18:11
You'll need to instantiate an instance of the p2p class, and implement a way to suspend the main thread until it completes (p2p starts its own thread pool). There are examples of this in the p2p class test cases.
evoskuil18:12
Then you'll need to implement a transaction protocol. There are protocols implemented in the network library, but not for tx (there's no place to store them). You can use the others as examples, but a better example might be to look at libbitcoin-node protocols, as there are implementations for incoming blocks. You can make a much simpler one than those, but same idea.
evoskuil03:21
@Дмитрий Дмитриевич did you see these two replies I gave you today?
Дмитрий Дмитриевич03:44
yes but this is not the code that will work(-
Дмитрий Дмитриевич12:15
Hello, maybe today I'll be able the code -)