wallet.cpp compilation fixed
This commit is contained in:
parent
8269c8ad42
commit
5b2dc84c4a
2 changed files with 11 additions and 9 deletions
|
|
@ -1961,7 +1961,7 @@ namespace currency
|
|||
return true;
|
||||
}
|
||||
//---------------------------------------------------------------
|
||||
bool lookup_acc_outs(const account_keys& acc, const transaction& tx, std::vector<wallet_input_info>& outs, uint64_t& money_transfered, crypto::key_derivation& derivation)
|
||||
bool lookup_acc_outs(const account_keys& acc, const transaction& tx, std::vector<wallet_out_info>& outs, uint64_t& money_transfered, crypto::key_derivation& derivation)
|
||||
{
|
||||
crypto::public_key tx_pub_key = get_tx_pub_key_from_extra(tx);
|
||||
if (null_pkey == tx_pub_key)
|
||||
|
|
@ -1994,7 +1994,7 @@ namespace currency
|
|||
return false;
|
||||
}
|
||||
//---------------------------------------------------------------
|
||||
bool lookup_acc_outs_genesis(const account_keys& acc, const transaction& tx, const crypto::public_key& tx_pub_key, std::vector<wallet_input_info>& outs, uint64_t& money_transfered, crypto::key_derivation& derivation)
|
||||
bool lookup_acc_outs_genesis(const account_keys& acc, const transaction& tx, const crypto::public_key& tx_pub_key, std::vector<wallet_out_info>& outs, uint64_t& money_transfered, crypto::key_derivation& derivation)
|
||||
{
|
||||
uint64_t offset = 0;
|
||||
bool r = get_account_genesis_offset_by_address(get_account_address_as_str(acc.account_address), offset);
|
||||
|
|
@ -2015,13 +2015,13 @@ namespace currency
|
|||
return true;
|
||||
}
|
||||
//---------------------------------------------------------------
|
||||
bool lookup_acc_outs(const account_keys& acc, const transaction& tx, const crypto::public_key& tx_pub_key, std::vector<wallet_input_info>& outs, uint64_t& money_transfered, crypto::key_derivation& derivation)
|
||||
bool lookup_acc_outs(const account_keys& acc, const transaction& tx, const crypto::public_key& tx_pub_key, std::vector<wallet_out_info>& outs, uint64_t& money_transfered, crypto::key_derivation& derivation)
|
||||
{
|
||||
std::list<htlc_info> htlc_info_list;
|
||||
return lookup_acc_outs(acc, tx, tx_pub_key, outs, money_transfered, derivation, htlc_info_list);
|
||||
}
|
||||
//---------------------------------------------------------------
|
||||
bool lookup_acc_outs(const account_keys& acc, const transaction& tx, const crypto::public_key& tx_pub_key, std::vector<wallet_input_info>& outs, uint64_t& money_transfered, crypto::key_derivation& derivation, std::list<htlc_info>& htlc_info_list)
|
||||
bool lookup_acc_outs(const account_keys& acc, const transaction& tx, const crypto::public_key& tx_pub_key, std::vector<wallet_out_info>& outs, uint64_t& money_transfered, crypto::key_derivation& derivation, std::list<htlc_info>& htlc_info_list)
|
||||
{
|
||||
money_transfered = 0;
|
||||
bool r = generate_key_derivation(tx_pub_key, acc.view_secret_key, derivation);
|
||||
|
|
|
|||
|
|
@ -329,7 +329,7 @@ void wallet2::process_new_transaction(const currency::transaction& tx, uint64_t
|
|||
std::vector<std::string> recipients, remote_aliases;
|
||||
process_unconfirmed(tx, recipients, remote_aliases);
|
||||
|
||||
std::vector<wallet_input_info> outs;
|
||||
std::vector<wallet_out_info> outs;
|
||||
uint64_t tx_money_got_in_outs = 0;
|
||||
crypto::public_key tx_pub_key = null_pkey;
|
||||
bool r = parse_and_validate_tx_extra(tx, tx_pub_key);
|
||||
|
|
@ -477,7 +477,7 @@ void wallet2::process_new_transaction(const currency::transaction& tx, uint64_t
|
|||
|
||||
for (size_t i_in_outs = 0; i_in_outs != outs.size(); i_in_outs++)
|
||||
{
|
||||
size_t o = outs[i_in_outs];
|
||||
size_t o = outs[i_in_outs].index;
|
||||
WLT_THROW_IF_FALSE_WALLET_INT_ERR_EX(o < tx.vout.size(), "wrong out in transaction: internal index=" << o << ", total_outs=" << tx.vout.size());
|
||||
VARIANT_SWITCH_BEGIN(tx.vout[o]);
|
||||
VARIANT_CASE_CONST(tx_out_bare, out)
|
||||
|
|
@ -1087,7 +1087,7 @@ bool wallet2::handle_proposal(wallet_public::wallet_transfer_info& wti, const bc
|
|||
scan_tx_to_key_inputs(found_transfers, prop.tx_template);
|
||||
//scan outputs to figure out amount of change in escrow
|
||||
crypto::key_derivation derivation = AUTO_VAL_INIT(derivation);
|
||||
std::vector<size_t> outs;
|
||||
std::vector<wallet_out_info> outs;
|
||||
uint64_t tx_money_got_in_outs = 0;
|
||||
bool r = lookup_acc_outs(m_account.get_keys(), prop.tx_template, outs, tx_money_got_in_outs, derivation);
|
||||
THROW_IF_FALSE_WALLET_INT_ERR_EX(r, "Failed to lookup_acc_outs for tx: " << get_transaction_hash(prop.tx_template));
|
||||
|
|
@ -1932,7 +1932,7 @@ void wallet2::scan_tx_pool(bool& has_related_alias_in_unconfirmed)
|
|||
}
|
||||
|
||||
// read extra
|
||||
std::vector<size_t> outs;
|
||||
std::vector<wallet_out_info> outs;
|
||||
uint64_t tx_money_got_in_outs = 0;
|
||||
crypto::public_key tx_pub_key = null_pkey;
|
||||
r = parse_and_validate_tx_extra(tx, tx_pub_key);
|
||||
|
|
@ -1943,7 +1943,9 @@ void wallet2::scan_tx_pool(bool& has_related_alias_in_unconfirmed)
|
|||
THROW_IF_TRUE_WALLET_EX(!r, error::acc_outs_lookup_error, tx, tx_pub_key, m_account.get_keys());
|
||||
|
||||
//collect incomes
|
||||
td.receive_indices = outs;
|
||||
for (auto& o : outs)
|
||||
td.receive_indices.push_back(o.index);
|
||||
|
||||
bool new_multisig_spend_detected = false;
|
||||
//check if we have spendings
|
||||
uint64_t tx_money_spent_in_ins = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue