mempool: fix recommended fees

This commit is contained in:
nym21
2025-12-16 20:29:08 +01:00
parent 2ccf0ef856
commit 3ca83a2289
3 changed files with 22 additions and 8 deletions
+6
View File
@@ -34,6 +34,12 @@ impl EntryPool {
idx
}
/// Get an entry by its txid prefix.
pub fn get(&self, prefix: &TxidPrefix) -> Option<&Entry> {
let idx = self.prefix_to_idx.get(prefix)?;
self.entries.get(idx.as_usize())?.as_ref()
}
/// Remove an entry by its txid prefix.
pub fn remove(&mut self, prefix: &TxidPrefix) {
if let Some(idx) = self.prefix_to_idx.remove(prefix) {