forked from lthn/blockchain
assigning asset id from tx
This commit is contained in:
parent
7c4d8a41e8
commit
d573dd53fd
3 changed files with 10 additions and 0 deletions
|
|
@ -2594,6 +2594,11 @@ namespace currency
|
|||
if (is_out_to_acc(acc, zo, derivation, output_index, amount, blinding_mask))
|
||||
{
|
||||
outs.emplace_back(output_index, amount, blinding_mask);
|
||||
open_asset_id v = AUTO_VAL_INIT(v);
|
||||
if (get_type_in_variant_container(zo.etc_details, v))
|
||||
{
|
||||
outs.back().asset_id = v.asset_id;
|
||||
}
|
||||
money_transfered += amount;
|
||||
}
|
||||
VARIANT_SWITCH_END();
|
||||
|
|
|
|||
|
|
@ -211,6 +211,7 @@ namespace currency
|
|||
size_t index = SIZE_MAX;
|
||||
uint64_t amount = 0;
|
||||
crypto::scalar_t blinding_mask = 0;
|
||||
crypto::hash asset_id = currency::null_hash;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -626,6 +626,10 @@ void wallet2::process_new_transaction(const currency::transaction& tx, uint64_t
|
|||
td.m_ptx_wallet_info = pwallet_info;
|
||||
td.m_internal_output_index = o;
|
||||
td.m_key_image = ki;
|
||||
if (outs[i_in_outs].asset_id != currency::null_hash)
|
||||
{
|
||||
td.m_asset_id.reset(new crypto::hash(outs[i_in_outs].asset_id));
|
||||
}
|
||||
td.m_amount = outs[i_in_outs].amount;
|
||||
if (m_use_deffered_global_outputs)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue