fixed some compilation issues on older compilers; disabled building of blockchain_utilities that prevent Mac from building statically

This commit is contained in:
Some Random Crypto Guy
2024-06-17 14:14:32 +01:00
parent 2be6890593
commit 226be59900
6 changed files with 140 additions and 127 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ if(NOT IOS)
add_subdirectory(gen_ssl_cert)
add_subdirectory(daemonizer)
add_subdirectory(daemon)
# add_subdirectory(blockchain_utilities)
add_subdirectory(blockchain_utilities)
endif()
if(BUILD_DEBUG_UTILITIES)
+131 -119
View File
@@ -133,55 +133,59 @@ monero_private_headers(blockchain_stats
${blockchain_stats_private_headers})
monero_add_executable(blockchain_import
${blockchain_import_sources}
${blockchain_import_private_headers})
#monero_add_executable(blockchain_import
# ${blockchain_import_sources}
# ${blockchain_import_private_headers})
target_link_libraries(blockchain_import
PRIVATE
cryptonote_core
blockchain_db
oracle
version
epee
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${Boost_THREAD_LIBRARY}
${CMAKE_THREAD_LIBS_INIT}
${EXTRA_LIBRARIES}
${Blocks})
#target_link_libraries(blockchain_import
# PRIVATE
# crypto
# cncrypto
# cryptonote_core
# blockchain_db
# oracle
# version
# epee
# ${Boost_FILESYSTEM_LIBRARY}
# ${Boost_SYSTEM_LIBRARY}
# ${Boost_THREAD_LIBRARY}
# ${CMAKE_THREAD_LIBS_INIT}
# ${EXTRA_LIBRARIES}
# ${Blocks})
if(ARCH_WIDTH)
target_compile_definitions(blockchain_import
PUBLIC -DARCH_WIDTH=${ARCH_WIDTH})
endif()
#if(ARCH_WIDTH)
# target_compile_definitions(blockchain_import
# PUBLIC -DARCH_WIDTH=${ARCH_WIDTH})
#endif()
set_property(TARGET blockchain_import
PROPERTY
OUTPUT_NAME "salvium-blockchain-import")
install(TARGETS blockchain_import DESTINATION bin)
#set_property(TARGET blockchain_import
# PROPERTY
# OUTPUT_NAME "salvium-blockchain-import")
#install(TARGETS blockchain_import DESTINATION bin)
monero_add_executable(blockchain_export
${blockchain_export_sources}
${blockchain_export_private_headers})
#monero_add_executable(blockchain_export
# ${blockchain_export_sources}
# ${blockchain_export_private_headers})
target_link_libraries(blockchain_export
PRIVATE
cryptonote_core
blockchain_db
oracle
version
epee
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${Boost_THREAD_LIBRARY}
${CMAKE_THREAD_LIBS_INIT}
${EXTRA_LIBRARIES})
#target_link_libraries(blockchain_export
# PRIVATE
# crypto
# cncrypto
# cryptonote_core
# blockchain_db
# oracle
# version
# epee
# ${Boost_FILESYSTEM_LIBRARY}
# ${Boost_SYSTEM_LIBRARY}
# ${Boost_THREAD_LIBRARY}
# ${CMAKE_THREAD_LIBS_INIT}
# ${EXTRA_LIBRARIES})
set_property(TARGET blockchain_export
PROPERTY
OUTPUT_NAME "salvium-blockchain-export")
install(TARGETS blockchain_export DESTINATION bin)
#set_property(TARGET blockchain_export
# PROPERTY
# OUTPUT_NAME "salvium-blockchain-export")
#install(TARGETS blockchain_export DESTINATION bin)
monero_add_executable(blockchain_blackball
${blockchain_blackball_sources}
@@ -190,6 +194,8 @@ monero_add_executable(blockchain_blackball
target_link_libraries(blockchain_blackball
PRIVATE
wallet
crypto
cncrypto
cryptonote_core
blockchain_db
oracle
@@ -207,93 +213,95 @@ set_property(TARGET blockchain_blackball
install(TARGETS blockchain_blackball DESTINATION bin)
monero_add_executable(blockchain_usage
${blockchain_usage_sources}
${blockchain_usage_private_headers})
#monero_add_executable(blockchain_usage
# ${blockchain_usage_sources}
# ${blockchain_usage_private_headers})
target_link_libraries(blockchain_usage
PRIVATE
cryptonote_core
blockchain_db
oracle
version
epee
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${Boost_THREAD_LIBRARY}
${CMAKE_THREAD_LIBS_INIT}
${EXTRA_LIBRARIES})
#target_link_libraries(blockchain_usage
# PRIVATE
# crypto
# cncrypto
# cryptonote_core
# blockchain_db
# oracle
# version
# epee
# ${Boost_FILESYSTEM_LIBRARY}
# ${Boost_SYSTEM_LIBRARY}
# ${Boost_THREAD_LIBRARY}
# ${CMAKE_THREAD_LIBS_INIT}
# ${EXTRA_LIBRARIES})
set_property(TARGET blockchain_usage
PROPERTY
OUTPUT_NAME "salvium-blockchain-usage")
install(TARGETS blockchain_usage DESTINATION bin)
#set_property(TARGET blockchain_usage
# PROPERTY
# OUTPUT_NAME "salvium-blockchain-usage")
#nstall(TARGETS blockchain_usage DESTINATION bin)
monero_add_executable(blockchain_ancestry
${blockchain_ancestry_sources}
${blockchain_ancestry_private_headers})
#monero_add_executable(blockchain_ancestry
# ${blockchain_ancestry_sources}
# ${blockchain_ancestry_private_headers})
target_link_libraries(blockchain_ancestry
PRIVATE
cryptonote_core
blockchain_db
oracle
version
epee
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${Boost_THREAD_LIBRARY}
${CMAKE_THREAD_LIBS_INIT}
${EXTRA_LIBRARIES})
#target_link_libraries(blockchain_ancestry
# PRIVATE
# cryptonote_core
# blockchain_db
# oracle
# version
# epee
# ${Boost_FILESYSTEM_LIBRARY}
# ${Boost_SYSTEM_LIBRARY}
# ${Boost_THREAD_LIBRARY}
# ${CMAKE_THREAD_LIBS_INIT}
# ${EXTRA_LIBRARIES})
set_property(TARGET blockchain_ancestry
PROPERTY
OUTPUT_NAME "salvium-blockchain-ancestry")
install(TARGETS blockchain_ancestry DESTINATION bin)
#set_property(TARGET blockchain_ancestry
# PROPERTY
# OUTPUT_NAME "salvium-blockchain-ancestry")
#install(TARGETS blockchain_ancestry DESTINATION bin)
monero_add_executable(blockchain_depth
${blockchain_depth_sources}
${blockchain_depth_private_headers})
# monero_add_executable(blockchain_depth
# ${blockchain_depth_sources}
# ${blockchain_depth_private_headers})
target_link_libraries(blockchain_depth
PRIVATE
cryptonote_core
blockchain_db
oracle
version
epee
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${Boost_THREAD_LIBRARY}
${CMAKE_THREAD_LIBS_INIT}
${EXTRA_LIBRARIES})
#target_link_libraries(blockchain_depth
# PRIVATE
# cryptonote_core
# blockchain_db
# oracle
# version
# epee
# ${Boost_FILESYSTEM_LIBRARY}
# ${Boost_SYSTEM_LIBRARY}
# ${Boost_THREAD_LIBRARY}
# ${CMAKE_THREAD_LIBS_INIT}
# ${EXTRA_LIBRARIES})
set_property(TARGET blockchain_depth
PROPERTY
OUTPUT_NAME "salvium-blockchain-depth")
install(TARGETS blockchain_depth DESTINATION bin)
#set_property(TARGET blockchain_depth
# PROPERTY
# OUTPUT_NAME "salvium-blockchain-depth")
#install(TARGETS blockchain_depth DESTINATION bin)
monero_add_executable(blockchain_stats
${blockchain_stats_sources}
${blockchain_stats_private_headers})
#monero_add_executable(blockchain_stats
# ${blockchain_stats_sources}
# ${blockchain_stats_private_headers})
target_link_libraries(blockchain_stats
PRIVATE
cryptonote_core
blockchain_db
oracle
version
epee
${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY}
${Boost_THREAD_LIBRARY}
${CMAKE_THREAD_LIBS_INIT}
${EXTRA_LIBRARIES})
#target_link_libraries(blockchain_stats
# PRIVATE
# cryptonote_core
# blockchain_db
# oracle
# version
# epee
# ${Boost_FILESYSTEM_LIBRARY}
# ${Boost_SYSTEM_LIBRARY}
# ${Boost_THREAD_LIBRARY}
# ${CMAKE_THREAD_LIBS_INIT}
# ${EXTRA_LIBRARIES})
set_property(TARGET blockchain_stats
PROPERTY
OUTPUT_NAME "salvium-blockchain-stats")
install(TARGETS blockchain_stats DESTINATION bin)
#set_property(TARGET blockchain_stats
# PROPERTY
# OUTPUT_NAME "salvium-blockchain-stats")
#install(TARGETS blockchain_stats DESTINATION bin)
monero_add_executable(blockchain_prune_known_spent_data
${blockchain_prune_known_spent_data_sources}
@@ -301,6 +309,8 @@ monero_add_executable(blockchain_prune_known_spent_data
target_link_libraries(blockchain_prune_known_spent_data
PRIVATE
crypto
cncrypto
cryptonote_core
blockchain_db
oracle
@@ -329,6 +339,8 @@ install(TARGETS blockchain_prune DESTINATION bin)
target_link_libraries(blockchain_prune
PRIVATE
crypto
cncrypto
cryptonote_core
blockchain_db
oracle
+2 -2
View File
@@ -1495,11 +1495,11 @@ bool Blockchain::validate_protocol_transaction(const block& b, uint64_t height,
if (o.target.type() == typeid(txout_to_key)) {
txout_to_key out = boost::get<txout_to_key>(o.target);
CHECK_AND_ASSERT_MES(out.unlock_time == CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW, false, "Invalid unlock time on protocol_tx output");
outputs[out.key] = {out.asset_type, o.amount, out.unlock_time};
outputs[out.key] = std::make_tuple(out.asset_type, o.amount, out.unlock_time);
} else if (o.target.type() == typeid(txout_to_tagged_key)) {
txout_to_tagged_key out = boost::get<txout_to_tagged_key>(o.target);
CHECK_AND_ASSERT_MES(out.unlock_time == CRYPTONOTE_MINED_MONEY_UNLOCK_WINDOW, false, "Invalid unlock time on protocol_tx output");
outputs[out.key] = {out.asset_type, o.amount, out.unlock_time};
outputs[out.key] = std::make_tuple(out.asset_type, o.amount, out.unlock_time);
} else {
MERROR("Block at height: " << height << " attempting to add protocol transaction with invalid type " << o.target.type().name());
return false;
@@ -480,6 +480,7 @@ static void set_tx_inputs(
offsets.emplace_back(e.first);
unsigned_tx.vin[i] = cryptonote::txin_to_key{
.amount = 0,
.asset_type = sources[i].asset_type,
.key_offsets = cryptonote::absolute_output_offsets_to_relative(offsets),
.k_image = rct::rct2ki(sources[i].multisig_kLRki.ki),
};
+2 -2
View File
@@ -2491,7 +2491,7 @@ bool simple_wallet::show_qr_code(const std::vector<std::string> &args)
WTEXTON();
try
{
const std::string address = "monero:" + m_wallet->get_subaddress_as_str({m_current_subaddress_account, subaddress_index});
const std::string address = "salvium:" + m_wallet->get_subaddress_as_str({m_current_subaddress_account, subaddress_index});
const qrcodegen::QrCode qr = qrcodegen::QrCode::encodeText(address.c_str(), qrcodegen::QrCode::Ecc::LOW);
for (int y = -2; y < qr.getSize() + 2; y+=2)
{
@@ -6874,7 +6874,7 @@ bool simple_wallet::transfer_main(
}
else
{
if (boost::starts_with(local_args[i], "monero:"))
if (boost::starts_with(local_args[i], "salvium:"))
fail_msg_writer() << tr("Invalid last argument: ") << local_args.back() << ": " << error;
else
fail_msg_writer() << tr("Invalid last argument: ") << local_args.back();
+3 -3
View File
@@ -14582,7 +14582,7 @@ std::string wallet2::make_uri(const std::string &address, const std::string &pay
return std::string();
}
std::string uri = "monero:" + address;
std::string uri = "salvium:" + address;
unsigned int n_fields = 0;
if (!payment_id.empty())
@@ -14611,9 +14611,9 @@ std::string wallet2::make_uri(const std::string &address, const std::string &pay
//----------------------------------------------------------------------------------------------------
bool wallet2::parse_uri(const std::string &uri, std::string &address, std::string &payment_id, uint64_t &amount, std::string &tx_description, std::string &recipient_name, std::vector<std::string> &unknown_parameters, std::string &error)
{
if (uri.substr(0, 7) != "monero:")
if (uri.substr(0, 7) != "salvium:")
{
error = std::string("URI has wrong scheme (expected \"monero:\"): ") + uri;
error = std::string("URI has wrong scheme (expected \"salvium:\"): ") + uri;
return false;
}