forked from lthn/blockchain
wallet: minor htlc error-handling improvement
This commit is contained in:
parent
2b1d890b74
commit
bbdd6595bf
1 changed files with 3 additions and 2 deletions
|
|
@ -404,8 +404,9 @@ void wallet2::process_new_transaction(const currency::transaction& tx, uint64_t
|
|||
if (it != m_active_htlcs.end())
|
||||
{
|
||||
transfer_details& td = m_transfers[it->second];
|
||||
WLT_THROW_IF_FALSE_WALLET_INT_ERR_EX(td.m_ptx_wallet_info->m_tx.vout.size() > td.m_internal_output_index, "Internal error: wrong index in m_transfers");
|
||||
WLT_THROW_IF_FALSE_WALLET_INT_ERR_EX(td.m_ptx_wallet_info->m_tx.vout[td.m_internal_output_index].target.type() == typeid(txout_htlc), "Internal error: wrong index in m_transfers");
|
||||
WLT_THROW_IF_FALSE_WALLET_INT_ERR_EX(td.m_ptx_wallet_info->m_tx.vout.size() > td.m_internal_output_index, "Internal error: wrong td.m_internal_output_index: " << td.m_internal_output_index);
|
||||
const boost::typeindex::type_info& ti = td.m_ptx_wallet_info->m_tx.vout[td.m_internal_output_index].target.type();
|
||||
WLT_THROW_IF_FALSE_WALLET_INT_ERR_EX(ti == typeid(txout_htlc), "Internal error: wrong type of output's target: " << ti.name());
|
||||
//input spend active htlc
|
||||
m_transfers[it->second].m_spent_height = height;
|
||||
transfer_details_extra_option_htlc_info& tdeohi = get_or_add_field_to_variant_vector<transfer_details_extra_option_htlc_info>(td.varian_options);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue