Skip to content

Commit 66be672

Browse files
authored
Merge pull request #910 from evoskuil/master
Adapt to network changes.
2 parents 35af405 + 76f3653 commit 66be672

20 files changed

+79
-176
lines changed

Makefile.am

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ src_libbitcoin_node_la_SOURCES = \
7575
src/sessions/session.cpp \
7676
src/sessions/session_inbound.cpp \
7777
src/sessions/session_manual.cpp \
78-
src/sessions/session_outbound.cpp \
79-
src/sessions/session_tcp.cpp
78+
src/sessions/session_outbound.cpp
8079

8180
# local: test/libbitcoin-node-test
8281
#------------------------------------------------------------------------------
@@ -243,7 +242,6 @@ include_bitcoin_node_sessions_HEADERS = \
243242
include/bitcoin/node/sessions/session_outbound.hpp \
244243
include/bitcoin/node/sessions/session_peer.hpp \
245244
include/bitcoin/node/sessions/session_server.hpp \
246-
include/bitcoin/node/sessions/session_tcp.hpp \
247245
include/bitcoin/node/sessions/sessions.hpp
248246

249247
# files => ${bash_completiondir}

builds/cmake/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,7 @@ add_library( ${CANONICAL_LIB_NAME}
287287
"../../src/sessions/session.cpp"
288288
"../../src/sessions/session_inbound.cpp"
289289
"../../src/sessions/session_manual.cpp"
290-
"../../src/sessions/session_outbound.cpp"
291-
"../../src/sessions/session_tcp.cpp" )
290+
"../../src/sessions/session_outbound.cpp" )
292291

293292
# ${CANONICAL_LIB_NAME} project specific include directory normalization for build.
294293
#------------------------------------------------------------------------------

builds/msvc/vs2022/libbitcoin-node/libbitcoin-node.vcxproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@
161161
<ClCompile Include="..\..\..\..\src\sessions\session_inbound.cpp" />
162162
<ClCompile Include="..\..\..\..\src\sessions\session_manual.cpp" />
163163
<ClCompile Include="..\..\..\..\src\sessions\session_outbound.cpp" />
164-
<ClCompile Include="..\..\..\..\src\sessions\session_tcp.cpp" />
165164
<ClCompile Include="..\..\..\..\src\settings.cpp" />
166165
</ItemGroup>
167166
<ItemGroup>
@@ -228,7 +227,6 @@
228227
<ClInclude Include="..\..\..\..\include\bitcoin\node\sessions\session_outbound.hpp" />
229228
<ClInclude Include="..\..\..\..\include\bitcoin\node\sessions\session_peer.hpp" />
230229
<ClInclude Include="..\..\..\..\include\bitcoin\node\sessions\session_server.hpp" />
231-
<ClInclude Include="..\..\..\..\include\bitcoin\node\sessions\session_tcp.hpp" />
232230
<ClInclude Include="..\..\..\..\include\bitcoin\node\sessions\sessions.hpp" />
233231
<ClInclude Include="..\..\..\..\include\bitcoin\node\settings.hpp" />
234232
<ClInclude Include="..\..\..\..\include\bitcoin\node\version.hpp" />

builds/msvc/vs2022/libbitcoin-node/libbitcoin-node.vcxproj.filters

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,6 @@
180180
<ClCompile Include="..\..\..\..\src\sessions\session_outbound.cpp">
181181
<Filter>src\sessions</Filter>
182182
</ClCompile>
183-
<ClCompile Include="..\..\..\..\src\sessions\session_tcp.cpp">
184-
<Filter>src\sessions</Filter>
185-
</ClCompile>
186183
<ClCompile Include="..\..\..\..\src\settings.cpp">
187184
<Filter>src</Filter>
188185
</ClCompile>
@@ -377,9 +374,6 @@
377374
<ClInclude Include="..\..\..\..\include\bitcoin\node\sessions\session_server.hpp">
378375
<Filter>include\bitcoin\node\sessions</Filter>
379376
</ClInclude>
380-
<ClInclude Include="..\..\..\..\include\bitcoin\node\sessions\session_tcp.hpp">
381-
<Filter>include\bitcoin\node\sessions</Filter>
382-
</ClInclude>
383377
<ClInclude Include="..\..\..\..\include\bitcoin\node\sessions\sessions.hpp">
384378
<Filter>include\bitcoin\node\sessions</Filter>
385379
</ClInclude>

include/bitcoin/node.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@
8080
#include <bitcoin/node/sessions/session_outbound.hpp>
8181
#include <bitcoin/node/sessions/session_peer.hpp>
8282
#include <bitcoin/node/sessions/session_server.hpp>
83-
#include <bitcoin/node/sessions/session_tcp.hpp>
8483
#include <bitcoin/node/sessions/sessions.hpp>
8584

8685
#endif

include/bitcoin/node/channels/channel_http.hpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,18 @@
2727
namespace libbitcoin {
2828
namespace node {
2929

30-
/// Abstract base HTTP channel state for the node.
3130
class BCN_API channel_http
32-
: public network::channel_http,
33-
public node::channel
31+
: public node::channel,
32+
public network::channel_http
3433
{
3534
public:
3635
typedef std::shared_ptr<node::channel_http> ptr;
3736

3837
channel_http(const network::logger& log,
3938
const network::socket::ptr& socket, uint64_t identifier,
4039
const node::configuration& config, const options_t& options) NOEXCEPT
41-
: network::channel_http(log, socket, identifier, config.network, options),
42-
node::channel(log, socket, identifier, config)
40+
: node::channel(log, socket, identifier, config),
41+
network::channel_http(log, socket, identifier, config.network, options)
4342
{
4443
}
4544
};

include/bitcoin/node/channels/channel_peer.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@ namespace node {
2929

3030
/// Abstract base peer channel state for the node.
3131
class BCN_API channel_peer
32-
: public network::channel_peer,
33-
public node::channel
32+
: public node::channel,
33+
public network::channel_peer
3434
{
3535
public:
3636
typedef std::shared_ptr<node::channel_peer> ptr;
3737

3838
channel_peer(network::memory& allocator, const network::logger& log,
3939
const network::socket::ptr& socket, uint64_t identifier,
4040
const node::configuration& config, const options_t& options) NOEXCEPT
41-
: network::channel_peer(allocator, log, socket, identifier,
41+
: node::channel(log, socket, identifier, config),
42+
network::channel_peer(allocator, log, socket, identifier,
4243
config.network, options),
43-
node::channel(log, socket, identifier, config),
4444
announced_(config.node.announcement_cache)
4545
{
4646
}

include/bitcoin/node/channels/channel_tcp.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ namespace node {
2929

3030
/// Abstract base TCP channel state for the node.
3131
class BCN_API channel_tcp
32-
: public network::channel_tcp,
33-
public node::channel
32+
: public node::channel,
33+
public network::channel
3434
{
3535
public:
3636
typedef std::shared_ptr<node::channel_tcp> ptr;
3737

3838
channel_tcp(const network::logger& log, const network::socket::ptr& socket,
3939
uint64_t identifier, const node::configuration& config,
4040
const options_t& options) NOEXCEPT
41-
: network::channel_tcp(log, socket, identifier, config.network, options),
42-
node::channel(log, socket, identifier, config)
41+
: node::channel(log, socket, identifier, config),
42+
network::channel(log, socket, identifier, config.network, options)
4343
{
4444
}
4545
};

include/bitcoin/node/channels/channel_ws.hpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,18 @@
2727
namespace libbitcoin {
2828
namespace node {
2929

30-
/// Abstract base websocket channel state for the node.
31-
/// Does not inherit node::channel_http but does inherit network::channel_http.
3230
class BCN_API channel_ws
33-
: public network::channel_ws,
34-
public node::channel
31+
: public node::channel,
32+
public network::channel_ws
3533
{
3634
public:
3735
typedef std::shared_ptr<node::channel_ws> ptr;
3836

3937
channel_ws(const network::logger& log, const network::socket::ptr& socket,
4038
uint64_t identifier, const node::configuration& config,
4139
const options_t& options) NOEXCEPT
42-
: network::channel_ws(log, socket, identifier, config.network, options),
43-
node::channel(log, socket, identifier, config)
40+
: node::channel(log, socket, identifier, config),
41+
network::channel_ws(log, socket, identifier, config.network, options)
4442
{
4543
}
4644
};

include/bitcoin/node/protocols/protocol_html.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ namespace node {
2929

3030
/// Abstract base for HTML protocols, thread safe.
3131
class BCN_API protocol_html
32-
: public network::protocol_http,
33-
public node::protocol
32+
: public node::protocol,
33+
public network::protocol_http
3434
{
3535
public:
3636
/// http channel, but html settings.
@@ -41,9 +41,9 @@ class BCN_API protocol_html
4141
protocol_html(const auto& session,
4242
const network::channel::ptr& channel,
4343
const options_t& options) NOEXCEPT
44-
: network::protocol_http(session, channel, options),
45-
options_(options),
46-
node::protocol(session, channel)
44+
: node::protocol(session, channel),
45+
network::protocol_http(session, channel, options),
46+
options_(options)
4747
{
4848
}
4949

0 commit comments

Comments
 (0)