mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-17 15:21:30 +02:00
use non-zero value instead of throwing in case of failed tx
This commit is contained in:
@@ -656,9 +656,10 @@ namespace monero {
|
||||
// otherwise merge transfer fields
|
||||
m_account_index = gen_utils::reconcile(m_account_index, other->m_account_index, "transfer m_account_index");
|
||||
|
||||
// TODO monero core: failed m_tx in pool (after testUpdateLockedDifferentAccounts()) causes non-originating saved wallets to return duplicate incoming transfers but one has amount of 0
|
||||
// TODO monero core: failed tx in pool (after testUpdateLockedDifferentAccounts()) causes non-originating saved wallets to return duplicate incoming transfers but one has amount of 0
|
||||
if (m_amount != boost::none && other->m_amount != boost::none && *m_amount != *other->m_amount && (*m_amount == 0 || *other->m_amount == 0)) {
|
||||
throw std::runtime_error("failed tx in pool causes non-originating wallets to return duplicate incoming transfers but with one amount/m_num_suggested_confirmations of 0");
|
||||
std::cout << "WARNING: failed tx in pool causes non-originating wallets to return duplicate incoming transfers but with one amount/m_num_suggested_confirmations of 0, using non-zero amount" << std::endl;
|
||||
if (*m_amount == 0) m_amount = other->m_amount;
|
||||
} else {
|
||||
m_amount = gen_utils::reconcile(m_amount, other->m_amount, "transfer amount");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user