P2PServer: refactored BLOCK_NOTIFY logic
- Limit how many block requests can be in flight - Don't send requests for the same block twice
This commit is contained in:
@@ -289,6 +289,9 @@ struct hex_buf
|
||||
{
|
||||
FORCEINLINE hex_buf(const uint8_t* data, size_t size) : m_data(data), m_size(size) {}
|
||||
|
||||
template<typename T>
|
||||
explicit FORCEINLINE hex_buf(const T* data) : m_data(reinterpret_cast<const uint8_t*>(data)), m_size(sizeof(T)) {}
|
||||
|
||||
const uint8_t* m_data;
|
||||
size_t m_size;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user