Skip to content

Commit 2e37528

Browse files
authored
qtils (#249)
- outcome - hex, unhex - lexicographical_compare_three_way - optionTake - append, bytestr Signed-off-by: turuslan <[email protected]>
1 parent c319206 commit 2e37528

32 files changed

Lines changed: 55 additions & 707 deletions

cmake/Hunter/init.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ set(
3131
include(${CMAKE_CURRENT_LIST_DIR}/HunterGate.cmake)
3232

3333
HunterGate(
34-
URL https://github.com/qdrvm/hunter/archive/refs/tags/v0.25.3-qdrvm9.zip
35-
SHA1 7f3f8ee341aaac8c400e776c8a9f28e8fc458296
34+
URL https://github.com/qdrvm/hunter/archive/refs/tags/v0.25.3-qdrvm12.zip
35+
SHA1 9d4b9844b84d3dfbf4a90923eedb3875718abf54
3636
LOCAL
3737
)

cmake/dependencies.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ find_package(OpenSSL REQUIRED)
2222
hunter_add_package(Protobuf)
2323
find_package(Protobuf CONFIG REQUIRED)
2424

25+
hunter_add_package(qtils)
26+
find_package(qtils CONFIG REQUIRED)
27+
2528
find_package(Threads)
2629

2730
hunter_add_package(c-ares)

include/libp2p/common/final_action.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <optional>
1111
#include <utility>
1212

13-
#include <libp2p/common/option_take.hpp>
13+
#include <qtils/option_take.hpp>
1414

1515
namespace libp2p::common {
1616

include/libp2p/common/hexutil.hpp

Lines changed: 0 additions & 62 deletions
This file was deleted.

include/libp2p/common/option_take.hpp

Lines changed: 0 additions & 34 deletions
This file was deleted.

include/libp2p/common/types.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@
88

99
#include <array>
1010
#include <cstdint>
11+
#include <qtils/cxx20/lexicographical_compare_three_way.hpp>
1112
#include <span>
1213
#include <vector>
1314

14-
#include <libp2p/cxx20/lexicographical_compare_three_way.hpp>
15-
1615
namespace libp2p::common {
1716
/// Hash160 as a sequence of 20 bytes
1817
using Hash160 = std::array<uint8_t, 20u>;
@@ -44,7 +43,7 @@ namespace libp2p {
4443

4544
inline auto operator<=>(const SpanOfBytes auto &lhs,
4645
const SpanOfBytes auto &rhs) {
47-
return cxx20::lexicographical_compare_three_way(
46+
return qtils::cxx20::lexicographical_compare_three_way(
4847
lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
4948
}
5049

include/libp2p/cxx20/lexicographical_compare_three_way.hpp

Lines changed: 0 additions & 71 deletions
This file was deleted.

include/libp2p/multi/uvarint.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ namespace libp2p::multi {
5757

5858
const std::vector<uint8_t> &toVector() const;
5959

60-
std::string toHex() const;
61-
6260
/**
6361
* Assigns the varint to an unsigned integer, encoding the latter
6462
* @param n the integer to encode and store

include/libp2p/outcome/outcome-register.hpp

Lines changed: 0 additions & 122 deletions
This file was deleted.

0 commit comments

Comments
 (0)