Skip to content

Commit b5fdf56

Browse files
committed
Refactor settings for uniform treatment of services.
1 parent 70948c2 commit b5fdf56

File tree

5 files changed

+491
-403
lines changed

5 files changed

+491
-403
lines changed

console/executor_runner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ bool executor::do_run()
139139
logger(BN_NODE_INTERRUPT);
140140

141141
// Create node.
142-
metadata_.configured.network.initialize();
142+
metadata_.configured.network.manual.initialize();
143143
node_ = std::make_shared<full_node>(query_, metadata_.configured, log_);
144144

145145
// Subscribe node.

include/bitcoin/node/sessions/session_peer.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class session_peer
3939
{
4040
public:
4141
typedef std::shared_ptr<session_peer<Session>> ptr;
42-
using options_t = network::settings::tcp_server;
42+
using options_t = typename Session::options_t;
4343
using channel_t = node::channel_peer;
4444

4545
/// Construct an instance.
@@ -60,10 +60,9 @@ class session_peer
6060
{
6161
BC_ASSERT(this->stranded());
6262

63-
// TODO: send options_t.
6463
const auto channel = std::make_shared<channel_t>(
6564
this->get_memory(), this->log, socket, this->create_key(),
66-
this->config(), options_t{});
65+
this->config(), this->options());
6766

6867
return std::static_pointer_cast<network::channel>(channel);
6968
}

include/bitcoin/node/settings.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,12 @@ class BCN_API settings
160160
settings(system::chain::selection context, const embedded_pages& explore,
161161
const embedded_pages& web) NOEXCEPT;
162162

163-
/// native RESTful block explorer (http/s, stateless html/json)
164-
server::settings::html_server explore;
165-
166163
/// native admin web interface, isolated (http/s, stateless html)
167164
server::settings::html_server web;
168165

166+
/// native RESTful block explorer (http/s, stateless html/json)
167+
server::settings::html_server explore;
168+
169169
/// native websocket query interface (http/s->tcp/s, json, handshake)
170170
network::settings::websocket_server socket{ "socket" };
171171

src/chasers/chaser_check.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ chaser_check::chaser_check(full_node& node) NOEXCEPT
4646
: chaser(node),
4747
maximum_concurrency_(node.config().node.maximum_concurrency_()),
4848
maximum_height_(node.config().node.maximum_height_()),
49-
connections_(node.config().network.outbound_connections),
49+
connections_(node.config().network.outbound.connections),
5050
allowed_deviation_(node.config().node.allowed_deviation)
5151
{
5252
}
@@ -518,7 +518,7 @@ size_t chaser_check::set_unassociated() NOEXCEPT
518518
size_t chaser_check::get_inventory_size() const NOEXCEPT
519519
{
520520
// Either condition means blocks shouldn't be getting downloaded (yet).
521-
const size_t peers = config().network.outbound_connections;
521+
const size_t peers = config().network.outbound.connections;
522522
if (is_zero(peers) || !is_current(false))
523523
return zero;
524524

0 commit comments

Comments
 (0)