diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 1234855..949323a 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -11645,6 +11645,9 @@ std::vector wallet2::create_transactions_all(uint64_t below const bool do_carrot_tx_construction = use_fork_rules(HF_VERSION_CARROT); if (do_carrot_tx_construction) { + // Sanity checks + THROW_WALLET_EXCEPTION_IF(!address.m_is_carrot, error::wallet_internal_error, "CryptoNote address supplied, but Carrot is now active"); + const auto tx_proposals = tools::wallet::make_carrot_transaction_proposals_wallet2_sweep_all(*this, below, address, is_subaddress, outputs, priority, extra, tx_type, subaddr_account, subaddr_indices); std::vector ptx_vector; ptx_vector.reserve(tx_proposals.size()); @@ -11653,6 +11656,9 @@ std::vector wallet2::create_transactions_all(uint64_t below return ptx_vector; } + // Sanity checks + THROW_WALLET_EXCEPTION_IF(address.m_is_carrot, error::wallet_internal_error, "Carrot address supplied, but Carrot not yet active"); + std::vector unused_transfers_indices; std::vector unused_dust_indices; const bool use_per_byte_fee = true; @@ -11735,6 +11741,9 @@ std::vector wallet2::create_transactions_single(const crypt const bool do_carrot_tx_construction = use_fork_rules(HF_VERSION_CARROT); if (do_carrot_tx_construction) { + // Sanity checks + THROW_WALLET_EXCEPTION_IF(!address.m_is_carrot, error::wallet_internal_error, "CryptoNote address supplied, but Carrot is now active"); + const auto tx_proposals = tools::wallet::make_carrot_transaction_proposals_wallet2_sweep(*this, {ki}, address, is_subaddress, outputs, priority, extra, tx_type); std::vector ptx_vector; ptx_vector.reserve(tx_proposals.size()); @@ -11744,6 +11753,9 @@ std::vector wallet2::create_transactions_single(const crypt return ptx_vector; } + // Sanity checks + THROW_WALLET_EXCEPTION_IF(address.m_is_carrot, error::wallet_internal_error, "Carrot address supplied, but Carrot not yet active"); + std::vector unused_transfers_indices; std::vector unused_dust_indices; const bool use_rct = use_fork_rules(4, 0);