1
0
Fork 0
forked from lthn/blockchain

fixed last issues with redeem atomics, worked first time ever

This commit is contained in:
cryptozoidberg 2021-02-16 17:45:20 +01:00
parent d8f276b30b
commit 367a786642
No known key found for this signature in database
GPG key ID: 22DEB97A54C6FDEC
2 changed files with 7 additions and 3 deletions

View file

@ -2020,7 +2020,11 @@ bool wallet2::scan_unconfirmed_outdate_tx()
{
auto& t = m_transfers[i];
if (t.m_flags&WALLET_TRANSFER_DETAIL_FLAG_SPENT && !t.m_spent_height && !static_cast<bool>(t.m_flags&WALLET_TRANSFER_DETAIL_FLAG_ESCROW_PROPOSAL_RESERVATION))
if (t.m_flags&WALLET_TRANSFER_DETAIL_FLAG_SPENT
&& !t.m_spent_height
&& !static_cast<bool>(t.m_flags&WALLET_TRANSFER_DETAIL_FLAG_ESCROW_PROPOSAL_RESERVATION)
&& t.m_ptx_wallet_info->m_tx.vout[t.m_internal_output_index].target.type() != typeid(txout_htlc)
)
{
//check if there is unconfirmed for this transfer is no longer exist?
if (!ki_in_unconfirmed.count((t.m_key_image)))

View file

@ -226,8 +226,8 @@ bool atomic_simple_test::c1(currency::core& c, size_t ev_index, const std::vecto
CHECK_AND_FORCE_ASSERT_MES(alice_a_wlt_instance->balance() == 0, false, "Incorrect balance");
CHECK_AND_FORCE_ASSERT_MES(bob_b_wlt_instance->balance() == 0, false, "Incorrect balance");
CHECK_AND_FORCE_ASSERT_MES(alice_b_wlt_instance->balance() == transfer_amount - TESTS_DEFAULT_FEE, false, "Incorrect balance");
CHECK_AND_FORCE_ASSERT_MES(bob_a_wlt_instance->balance() == transfer_amount - TESTS_DEFAULT_FEE, false, "Incorrect balance");
CHECK_AND_FORCE_ASSERT_MES(alice_b_wlt_instance->balance() == transfer_amount - TESTS_DEFAULT_FEE*2 , false, "Incorrect balance");
CHECK_AND_FORCE_ASSERT_MES(bob_a_wlt_instance->balance() == transfer_amount - TESTS_DEFAULT_FEE*2, false, "Incorrect balance");
return r;
}