Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/carrot_core/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,10 @@ static constexpr const unsigned char CARROT_DOMAIN_SEP_SUBADDRESS_SCALAR[] = "Ca
// Carrot misc constants
static constexpr const unsigned int CARROT_MIN_TX_OUTPUTS = 2;
static constexpr const unsigned int CARROT_MIN_TX_INPUTS = 1;

// Downstream hot/cold protocol domain separators
static constexpr const unsigned char HOT_COLD_DOMAIN_SEP_NORMAL_JANUS_ANCHOR[] = "Carrot Hot-cold normal janus anchor";
static constexpr const unsigned char HOT_COLD_DOMAIN_SEP_SPECIAL_EPHEM[] = "Carrot Hot-cold special ephemeral privkey";
static constexpr const unsigned char HOT_COLD_DOMAIN_SEP_DUMMY_PID[] = "Carrot Hot-cold dummy encrypted payment id";
static constexpr const unsigned char HOT_COLD_DOMAIN_SEP_RERANDOMIZATION[] = "Carrot Hot-cold rerandomization scalar";
} //namespace carrot
1 change: 1 addition & 0 deletions src/carrot_impl/output_opening_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
//third party headers
#include "carrot_core/carrot_enote_types.h"
#include "fcmp_pp/fcmp_pp_types.h"
#include "ringct/rctTypes.h"
#include "span.h"
#include "subaddress_index.h"

Expand Down
2 changes: 1 addition & 1 deletion src/debug_utilities/object_sizes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ int main(int argc, char* argv[])
SL(tools::wallet2::confirmed_transfer_details);
SL(tools::wallet2::tx_construction_data);
SL(tools::wallet2::pending_tx);
SL(tools::wallet2::unsigned_tx_set);
SL(tools::wallet::cold::UnsignedTransactionSetVariant);
SL(tools::wallet2::signed_tx_set);

SL(Monero::WalletImpl);
Expand Down
188 changes: 111 additions & 77 deletions src/simplewallet/simplewallet.cpp

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions src/simplewallet/simplewallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,10 @@ namespace cryptonote
uint64_t get_daemon_blockchain_height(std::string& err);
bool try_connect_to_daemon(bool silent = false, uint32_t* version = nullptr);
bool ask_wallet_create_if_needed();
bool accept_loaded_tx(const std::function<size_t()> get_num_txes, const std::function<const tools::wallet2::tx_construction_data&(size_t)> &get_tx, const std::string &extra_message = std::string());
bool accept_loaded_tx(const tools::wallet2::unsigned_tx_set &txs);
bool accept_loaded_tx(const std::function<size_t()> get_num_txes, const std::function<tools::wallet::tx_reconstruct_variant_t(size_t)> &get_tx, const std::string &extra_message = std::string());
bool accept_loaded_tx(const tools::wallet::cold::UnsignedPreCarrotTransactionSet &txs);
bool accept_loaded_tx(const tools::wallet::cold::UnsignedCarrotTransactionSetV1 &txs);
bool accept_loaded_tx(const tools::wallet::cold::UnsignedTransactionSetVariant &txs);
bool accept_loaded_tx(const tools::wallet2::signed_tx_set &txs);
bool process_ring_members(const std::vector<tools::wallet2::pending_tx>& ptx_vector, std::ostream& ostr, bool verbose);
std::string get_prompt() const;
Expand Down
1 change: 1 addition & 0 deletions src/wallet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ set(wallet_sources
node_rpc_proxy.cpp
message_store.cpp
message_transporter.cpp
misc_wallet_utils.cpp
scanning_tools.cpp
tx_builder.cpp
)
Expand Down
5 changes: 4 additions & 1 deletion src/wallet/api/pending_transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,12 @@ bool PendingTransactionImpl::commit(const std::string &filename, bool overwrite)

const bool tx_cold_signed = m_wallet.m_wallet->get_account().get_device().has_tx_cold_sign();
if (tx_cold_signed){
wallet2_basic::transfer_container transfers;
m_wallet.m_wallet->get_transfers(transfers);

std::unordered_set<size_t> selected_transfers;
for(const tools::wallet2::pending_tx & ptx : m_pending_tx){
for(size_t s : ptx.selected_transfers){
for(size_t s : tools::wallet::collect_selected_transfer_indices(ptx.construction_data, transfers)){
selected_transfers.insert(s);
}
}
Expand Down
Loading
Loading