Skip to content

Commit b19e5ac

Browse files
authored
Merge pull request #840 from evoskuil/master
Adapt to network::messages namespace changes.
2 parents 2264ba7 + 92faeb4 commit b19e5ac

27 files changed

+55
-55
lines changed

include/bitcoin/node/define.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ typedef event_subscriber::handler event_notifier;
9090
typedef event_subscriber::completer event_completer;
9191

9292
// Inventory messages.
93-
using type_id = network::messages::inventory_item::type_id;
93+
using type_id = network::messages::p2p::inventory_item::type_id;
9494

9595
// NDEBUG MSVC
9696
////static_assert(sizeof(uint64_t) == 8u);

include/bitcoin/node/protocols/protocol_block_in_106.hpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,28 +63,28 @@ class BCN_API protocol_block_in_106
6363

6464
/// Accept incoming inventory message.
6565
virtual bool handle_receive_inventory(const code& ec,
66-
const network::messages::inventory::cptr& message) NOEXCEPT;
66+
const network::messages::p2p::inventory::cptr& message) NOEXCEPT;
6767

6868
/// Accept incoming block message.
6969
virtual bool handle_receive_block(const code& ec,
70-
const network::messages::block::cptr& message) NOEXCEPT;
70+
const network::messages::p2p::block::cptr& message) NOEXCEPT;
7171
virtual void handle_organize(const code& ec, size_t height,
7272
const system::chain::block::cptr& block_ptr) NOEXCEPT;
7373
virtual void do_handle_organize(const code& ec, size_t height,
7474
const system::chain::block::cptr& block_ptr) NOEXCEPT;
7575

7676
private:
7777
static hashmap to_hashes(size_t reserve,
78-
const network::messages::get_data& getter) NOEXCEPT;
78+
const network::messages::p2p::get_data& getter) NOEXCEPT;
7979

80-
network::messages::get_blocks create_get_inventory() const NOEXCEPT;
81-
network::messages::get_blocks create_get_inventory(
80+
network::messages::p2p::get_blocks create_get_inventory() const NOEXCEPT;
81+
network::messages::p2p::get_blocks create_get_inventory(
8282
const system::hash_digest& last) const NOEXCEPT;
83-
network::messages::get_blocks create_get_inventory(
83+
network::messages::p2p::get_blocks create_get_inventory(
8484
system::hashes&& start_hashes) const NOEXCEPT;
8585

86-
network::messages::get_data create_get_data(
87-
const network::messages::inventory& message) const NOEXCEPT;
86+
network::messages::p2p::get_data create_get_data(
87+
const network::messages::p2p::inventory& message) const NOEXCEPT;
8888

8989
// This is thread safe.
9090
const type_id block_type_;

include/bitcoin/node/protocols/protocol_block_in_31800.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ class BCN_API protocol_block_in_31800
7575

7676
/// Check incoming block message.
7777
virtual bool handle_receive_block(const code& ec,
78-
const network::messages::block::cptr& message) NOEXCEPT;
78+
const network::messages::p2p::block::cptr& message) NOEXCEPT;
7979

8080
private:
8181
code check(const system::chain::block& block,
8282
const system::chain::context& ctx, bool bypass) const NOEXCEPT;
8383

8484
void send_get_data(const map_ptr& map, const job::ptr& job) NOEXCEPT;
85-
network::messages::get_data create_get_data(
85+
network::messages::p2p::get_data create_get_data(
8686
const database::associations& map) const NOEXCEPT;
8787

8888
void restore(const map_ptr& map) NOEXCEPT;

include/bitcoin/node/protocols/protocol_block_out_106.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ class BCN_API protocol_block_out_106
6060
virtual bool do_announce(header_t link) NOEXCEPT;
6161

6262
virtual bool handle_receive_get_blocks(const code& ec,
63-
const network::messages::get_blocks::cptr& message) NOEXCEPT;
63+
const network::messages::p2p::get_blocks::cptr& message) NOEXCEPT;
6464
virtual bool handle_receive_get_data(const code& ec,
65-
const network::messages::get_data::cptr& message) NOEXCEPT;
65+
const network::messages::p2p::get_data::cptr& message) NOEXCEPT;
6666
virtual void send_block(const code& ec, size_t index,
67-
const network::messages::get_data::cptr& message) NOEXCEPT;
67+
const network::messages::p2p::get_data::cptr& message) NOEXCEPT;
6868

6969
private:
70-
network::messages::inventory create_inventory(
71-
const network::messages::get_blocks& locator) const NOEXCEPT;
70+
network::messages::p2p::inventory create_inventory(
71+
const network::messages::p2p::get_blocks& locator) const NOEXCEPT;
7272

7373
private:
7474
// These are thread safe.

include/bitcoin/node/protocols/protocol_block_out_70012.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class BCN_API protocol_block_out_70012
4949
bool superseded() const NOEXCEPT override;
5050

5151
virtual bool handle_receive_send_headers(const code& ec,
52-
const network::messages::send_headers::cptr& message) NOEXCEPT;
52+
const network::messages::p2p::send_headers::cptr& message) NOEXCEPT;
5353

5454
private:
5555
// This is protected by strand.

include/bitcoin/node/protocols/protocol_filter_out_70015.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ class BCN_API protocol_filter_out_70015
4747

4848
protected:
4949
virtual bool handle_receive_get_filter_checkpoint(const code& ec,
50-
const network::messages::get_client_filter_checkpoint::cptr& message) NOEXCEPT;
50+
const network::messages::p2p::get_client_filter_checkpoint::cptr& message) NOEXCEPT;
5151
virtual bool handle_receive_get_filter_headers(const code& ec,
52-
const network::messages::get_client_filter_headers::cptr& message) NOEXCEPT;
52+
const network::messages::p2p::get_client_filter_headers::cptr& message) NOEXCEPT;
5353
virtual bool handle_receive_get_filters(const code& ec,
54-
const network::messages::get_client_filters::cptr& message) NOEXCEPT;
54+
const network::messages::p2p::get_client_filters::cptr& message) NOEXCEPT;
5555

5656
private:
5757
using ancestry_ptr = std::shared_ptr<database::header_links>;

include/bitcoin/node/protocols/protocol_header_in_31800.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ class BCN_API protocol_header_in_31800
4646

4747
protected:
4848
virtual bool handle_receive_inventory(const code& ec,
49-
const network::messages::inventory::cptr& message) NOEXCEPT;
49+
const network::messages::p2p::inventory::cptr& message) NOEXCEPT;
5050
virtual bool handle_receive_headers(const code& ec,
51-
const network::messages::headers::cptr& message) NOEXCEPT;
51+
const network::messages::p2p::headers::cptr& message) NOEXCEPT;
5252
virtual void handle_organize(const code& ec, size_t height,
5353
const system::chain::header::cptr& header_ptr) NOEXCEPT;
5454
virtual void complete() NOEXCEPT;
@@ -57,10 +57,10 @@ class BCN_API protocol_header_in_31800
5757
bool subscribed{};
5858

5959
private:
60-
network::messages::get_headers create_get_headers() const NOEXCEPT;
61-
network::messages::get_headers create_get_headers(
60+
network::messages::p2p::get_headers create_get_headers() const NOEXCEPT;
61+
network::messages::p2p::get_headers create_get_headers(
6262
const system::hash_digest& last) const NOEXCEPT;
63-
network::messages::get_headers create_get_headers(
63+
network::messages::p2p::get_headers create_get_headers(
6464
system::hashes&& start_hashes) const NOEXCEPT;
6565
};
6666

include/bitcoin/node/protocols/protocol_header_out_31800.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ class BCN_API protocol_header_out_31800
4646

4747
protected:
4848
virtual bool handle_receive_get_headers(const code& ec,
49-
const network::messages::get_headers::cptr& message) NOEXCEPT;
49+
const network::messages::p2p::get_headers::cptr& message) NOEXCEPT;
5050

5151
private:
52-
network::messages::headers create_headers(
53-
const network::messages::get_headers& locator) const NOEXCEPT;
52+
network::messages::p2p::headers create_headers(
53+
const network::messages::p2p::get_headers& locator) const NOEXCEPT;
5454
};
5555

5656
} // namespace node

include/bitcoin/node/protocols/protocol_header_out_70012.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class BCN_API protocol_header_out_70012
5656
virtual bool do_announce(header_t link) NOEXCEPT;
5757

5858
virtual bool handle_receive_send_headers(const code& ec,
59-
const network::messages::send_headers::cptr& message) NOEXCEPT;
59+
const network::messages::p2p::send_headers::cptr& message) NOEXCEPT;
6060
};
6161

6262
} // namespace node

include/bitcoin/node/protocols/protocol_observer.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class BCN_API protocol_observer
4343
relay_disallowed_
4444
(
4545
std::dynamic_pointer_cast<network::channel_peer>(channel)->
46-
is_negotiated(network::messages::level::bip37) &&
46+
is_negotiated(network::messages::p2p::level::bip37) &&
4747
!session->config().network.enable_relay
4848
),
4949
node_witness_(session->config().network.witness_node()),
@@ -64,11 +64,11 @@ class BCN_API protocol_observer
6464

6565
/////// Accept incoming get_data message.
6666
////virtual bool handle_receive_get_data(const code& ec,
67-
//// const network::messages::get_data::cptr& message) NOEXCEPT;
67+
//// const network::messages::p2p::get_data::cptr& message) NOEXCEPT;
6868

6969
/// Accept incoming inventory message.
7070
virtual bool handle_receive_inventory(const code& ec,
71-
const network::messages::inventory::cptr& message) NOEXCEPT;
71+
const network::messages::p2p::inventory::cptr& message) NOEXCEPT;
7272

7373
// This is thread safe.
7474
const bool relay_disallowed_;

0 commit comments

Comments
 (0)