global: fixes

This commit is contained in:
nym21
2026-05-02 00:42:16 +02:00
parent 6f879a5551
commit 2b8a0a8cf7
99 changed files with 4308 additions and 1525 deletions
+4 -5
View File
@@ -75,11 +75,10 @@ impl AppState {
/// - Unknown address → `Tip`
pub fn addr_strategy(&self, version: Version, addr: &Addr, chain_only: bool) -> CacheStrategy {
self.sync(|q| {
if !chain_only {
let mempool_hash = q.addr_mempool_hash(addr);
if mempool_hash != 0 {
return CacheStrategy::MempoolHash(mempool_hash);
}
if !chain_only
&& let Some(mempool_hash) = q.addr_mempool_hash(addr)
{
return CacheStrategy::MempoolHash(mempool_hash);
}
q.addr_last_activity_height(addr)
.and_then(|h| {