File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -2961,6 +2961,8 @@ void wallet2::update_pool_state(std::vector<std::tuple<cryptonote::transaction,
2961
2961
MTRACE("update_pool_state got pool");
2962
2962
2963
2963
// remove any pending tx that's not in the pool
2964
+ constexpr const std::chrono::seconds tx_propagation_timeout{CRYPTONOTE_DANDELIONPP_EMBARGO_AVERAGE * 3 / 2};
2965
+ const auto now = std::chrono::system_clock::now();
2964
2966
std::unordered_map<crypto::hash, wallet2::unconfirmed_transfer_details>::iterator it = m_unconfirmed_txs.begin();
2965
2967
while (it != m_unconfirmed_txs.end())
2966
2968
{
@@ -2988,9 +2990,11 @@ void wallet2::update_pool_state(std::vector<std::tuple<cryptonote::transaction,
2988
2990
LOG_PRINT_L1("Pending txid " << txid << " not in pool, marking as not in pool");
2989
2991
pit->second.m_state = wallet2::unconfirmed_transfer_details::pending_not_in_pool;
2990
2992
}
2991
- else if (pit->second.m_state == wallet2::unconfirmed_transfer_details::pending_not_in_pool && refreshed)
2993
+ else if (pit->second.m_state == wallet2::unconfirmed_transfer_details::pending_not_in_pool && refreshed &&
2994
+ now > std::chrono::system_clock::from_time_t(pit->second.m_sent_time) + tx_propagation_timeout)
2992
2995
{
2993
- LOG_PRINT_L1("Pending txid " << txid << " not in pool, marking as failed");
2996
+ LOG_PRINT_L1("Pending txid " << txid << " not in pool after " << tx_propagation_timeout.count() <<
2997
+ " seconds, marking as failed");
2994
2998
pit->second.m_state = wallet2::unconfirmed_transfer_details::failed;
2995
2999
2996
3000
// the inputs aren't spent anymore, since the tx failed
You can’t perform that action at this time.
0 commit comments