Skip to content

Commit

Permalink
re-sort after modification. passes tests now
Browse files Browse the repository at this point in the history
  • Loading branch information
theuni committed Jun 1, 2024
1 parent 35d3e8c commit 6c34e0f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/txmempool.h
Original file line number Diff line number Diff line change
Expand Up @@ -477,9 +477,15 @@ class MempoolContainer
}

template <typename Callable>
void modify(const_iterator it, Callable&& func) const
void modify(const_iterator it, Callable&& func)
{
m_descendent_order.erase(it);
m_time_order.erase(it);
m_ancestor_order.erase(it);
func(const_cast<entry_type&>(*it));
m_descendent_order.insert(it);
m_time_order.insert(it);
m_ancestor_order.insert(it);
}

const_iterator iterator_to(const entry_type& entry) const
Expand Down

0 comments on commit 6c34e0f

Please sign in to comment.