diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0aa96cf729..5d80137f7d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -290,7 +290,7 @@ jobs: run: | git clone https://github.com/libunwind/libunwind cd libunwind - sudo ./autogen.sh + sudo autoreconf -i sudo ./configure sudo make -j 3 sudo make install diff --git a/contrib/epee/include/serialization/keyvalue_serialization_overloads.h b/contrib/epee/include/serialization/keyvalue_serialization_overloads.h index 1f9d6b6d7f..9cc1b3573f 100644 --- a/contrib/epee/include/serialization/keyvalue_serialization_overloads.h +++ b/contrib/epee/include/serialization/keyvalue_serialization_overloads.h @@ -32,6 +32,7 @@ #include #include #include +#include #undef MONERO_DEFAULT_LOG_CATEGORY #define MONERO_DEFAULT_LOG_CATEGORY "serialization" diff --git a/contrib/epee/include/storages/portable_storage.h b/contrib/epee/include/storages/portable_storage.h index ec85375f64..3ba58872b5 100644 --- a/contrib/epee/include/storages/portable_storage.h +++ b/contrib/epee/include/storages/portable_storage.h @@ -30,6 +30,7 @@ #include "portable_storage_val_converters.h" #include "misc_log_ex.h" #include "span.h" +#include namespace epee { diff --git a/src/blockchain_db/blockchain_db.cpp b/src/blockchain_db/blockchain_db.cpp index 75e9e1fd5c..3c3e0a95c2 100644 --- a/src/blockchain_db/blockchain_db.cpp +++ b/src/blockchain_db/blockchain_db.cpp @@ -216,15 +216,8 @@ void BlockchainDB::add_transaction(const crypto::hash& blk_hash, const std::pair } else { - LOG_PRINT_L1("Unsupported input type, removing key images and aborting transaction addition"); - for (const txin_v& tx_input : tx.vin) - { - if (tx_input.type() == typeid(txin_to_key)) - { - remove_spent_key(boost::get(tx_input).k_image); - } - } - return; + LOG_PRINT_L1("Unsupported input type, aborting transaction addition"); + throw std::runtime_error("Unexpected input type, aborting"); } } diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 23deed0c31..6721847fc2 100755 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -1016,6 +1016,8 @@ gamma_picker::gamma_picker(const std::vector &rct_offsets, double shap num_rct_outputs = *(end - 1); THROW_WALLET_EXCEPTION_IF(num_rct_outputs == 0, error::wallet_internal_error, "No rct outputs"); average_output_time = DIFFICULTY_TARGET * blocks_to_consider / outputs_to_consider; // this assumes constant target over the whole rct range + if (average_output_time == 0) + average_output_time = DIFFICULTY_TARGET * blocks_to_consider / static_cast(outputs_to_consider); }; gamma_picker::gamma_picker(const std::vector &rct_offsets): gamma_picker(rct_offsets, GAMMA_SHAPE, GAMMA_SCALE) {}