|
36 | 36 |
|
37 | 37 | #include <boost/program_options/variables_map.hpp>
|
38 | 38 | #include <string>
|
| 39 | +#include <thread> |
39 | 40 |
|
40 | 41 | #include "byte_slice.h"
|
41 | 42 | #include "math_helper.h"
|
|
49 | 50 | #include "cryptonote_basic/connection_context.h"
|
50 | 51 | #include "net/levin_base.h"
|
51 | 52 | #include "p2p/net_node_common.h"
|
| 53 | +#include "peerinfo_manager.h" |
| 54 | +#include "request_manager.h" |
| 55 | +#include "txrequesthandler.h" |
52 | 56 | #include <boost/circular_buffer.hpp>
|
| 57 | +#include <boost/uuid/uuid.hpp> |
| 58 | +#include <boost/uuid/nil_generator.hpp> |
53 | 59 |
|
54 | 60 | PUSH_WARNINGS
|
55 | 61 | DISABLE_VS_WARNINGS(4355)
|
@@ -94,8 +100,10 @@ namespace cryptonote
|
94 | 100 | HANDLE_NOTIFY_T2(NOTIFY_REQUEST_CHAIN, &cryptonote_protocol_handler::handle_request_chain)
|
95 | 101 | HANDLE_NOTIFY_T2(NOTIFY_RESPONSE_CHAIN_ENTRY, &cryptonote_protocol_handler::handle_response_chain_entry)
|
96 | 102 | HANDLE_NOTIFY_T2(NOTIFY_NEW_FLUFFY_BLOCK, &cryptonote_protocol_handler::handle_notify_new_fluffy_block)
|
97 |
| - HANDLE_NOTIFY_T2(NOTIFY_REQUEST_FLUFFY_MISSING_TX, &cryptonote_protocol_handler::handle_request_fluffy_missing_tx) |
| 103 | + HANDLE_NOTIFY_T2(NOTIFY_REQUEST_FLUFFY_MISSING_TX, &cryptonote_protocol_handler::handle_request_fluffy_missing_tx) |
98 | 104 | HANDLE_NOTIFY_T2(NOTIFY_GET_TXPOOL_COMPLEMENT, &cryptonote_protocol_handler::handle_notify_get_txpool_complement)
|
| 105 | + HANDLE_NOTIFY_T2(NOTIFY_TX_POOL_INV, &cryptonote_protocol_handler::handle_notify_tx_pool_inv) |
| 106 | + HANDLE_NOTIFY_T2(NOTIFY_REQUEST_TX_POOL_TXS, &cryptonote_protocol_handler::handle_request_tx_pool_txs) |
99 | 107 | END_INVOKE_MAP2()
|
100 | 108 |
|
101 | 109 | bool on_idle();
|
@@ -144,6 +152,8 @@ namespace cryptonote
|
144 | 152 | int handle_notify_new_fluffy_block(int command, NOTIFY_NEW_FLUFFY_BLOCK::request& arg, cryptonote_connection_context& context);
|
145 | 153 | int handle_request_fluffy_missing_tx(int command, NOTIFY_REQUEST_FLUFFY_MISSING_TX::request& arg, cryptonote_connection_context& context);
|
146 | 154 | int handle_notify_get_txpool_complement(int command, NOTIFY_GET_TXPOOL_COMPLEMENT::request& arg, cryptonote_connection_context& context);
|
| 155 | + int handle_notify_tx_pool_inv(int command, NOTIFY_TX_POOL_INV::request& arg, cryptonote_connection_context& context); |
| 156 | + int handle_request_tx_pool_txs(int command, NOTIFY_REQUEST_TX_POOL_TXS::request& arg, cryptonote_connection_context& context); |
147 | 157 |
|
148 | 158 | //----------------- i_bc_protocol_layout ---------------------------------------
|
149 | 159 | virtual bool relay_block(NOTIFY_NEW_FLUFFY_BLOCK::request& arg, cryptonote_connection_context& exclude_context);
|
@@ -193,6 +203,11 @@ namespace cryptonote
|
193 | 203 | size_t m_block_download_max_size;
|
194 | 204 | bool m_sync_pruned_blocks;
|
195 | 205 |
|
| 206 | + peer_info_manager m_peer_info_manager; |
| 207 | + request_manager m_request_manager; |
| 208 | + tx_request_handler m_tx_request_handler; |
| 209 | + tx_request_handler::tx_request_handler_runner m_tx_requests_runner; |
| 210 | + |
196 | 211 | // Values for sync time estimates
|
197 | 212 | boost::posix_time::ptime m_sync_start_time;
|
198 | 213 | boost::posix_time::ptime m_period_start_time;
|
|
0 commit comments