-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use oxenc; replace rlpvalue; c++20 modernizations and various cleanups
- Replace rlpvalue with oxenc (which now has an rlp serializer) - Use oxenc for hex conversions and hex literals - Switch compilation to C++20 - Switch to std::string_views or std::spans in various places instead of const lvalue strings or specific vector/array types. - Change Provider::sendTransaction and similar to not use `std::async` because they were just waiting for the async to return (which blocks the current thread anyway, and so might as well just happen in the current thread), and abstracted the get-and-wait code into a single function. - removed some unused utils functions - external -- brought in `system_or_submodule` from other oxen packages to have cmake check for system libs before building/using submodules for nlohman, secp256k1, oxen-encoding. - Turn off `-Wshadow` because, under GCC, it produces warnings for things it shouldn't, like constructor arguments that initialize members, and lambdas that capture a copy of the same name. Clang's `-Wshadow` is less stupid about this, but as this also causes a metric ton of warnings for dependent code (like oxend) just turn it off for now.
- Loading branch information
Showing
21 changed files
with
349 additions
and
480 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
macro(system_or_submodule BIGNAME smallname pkgconf subdir) | ||
option(FORCE_${BIGNAME}_SUBMODULE "force using ${smallname} submodule" OFF) | ||
if(NOT BUILD_STATIC_DEPS AND NOT FORCE_${BIGNAME}_SUBMODULE AND NOT FORCE_ALL_SUBMODULES) | ||
pkg_check_modules(${BIGNAME} ${pkgconf} IMPORTED_TARGET) | ||
endif() | ||
if(${BIGNAME}_FOUND) | ||
add_library(${smallname} INTERFACE) | ||
if(NOT TARGET PkgConfig::${BIGNAME} AND CMAKE_VERSION VERSION_LESS "3.21") | ||
# Work around cmake bug 22180 (PkgConfig::THING not set if no flags needed) | ||
else() | ||
target_link_libraries(${smallname} INTERFACE PkgConfig::${BIGNAME}) | ||
endif() | ||
message(STATUS "Found system ${smallname} ${${BIGNAME}_VERSION}") | ||
else() | ||
message(STATUS "using ${smallname} submodule") | ||
add_subdirectory(${subdir} EXCLUDE_FROM_ALL) | ||
endif() | ||
if(NOT TARGET ${smallname}::${smallname}) | ||
add_library(${smallname}::${smallname} ALIAS ${smallname}) | ||
endif() | ||
endmacro() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule cpr
updated
67 files
Submodule oxen-encoding
added at
201c4c
Submodule rlpvalue
deleted from
1e58dc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.