mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-19 22:34:46 -07:00
mempool: fixes
This commit is contained in:
@@ -254,4 +254,13 @@ impl Query {
|
||||
})
|
||||
.collect())
|
||||
}
|
||||
|
||||
/// Opaque content hash that changes whenever the projected next
|
||||
/// block changes. Same value used as the mempool ETag, surfaced as
|
||||
/// JSON so external monitors can detect a frozen update loop by
|
||||
/// polling: if the value doesn't change for tens of seconds on a
|
||||
/// live network, the mempool sync has stalled.
|
||||
pub fn mempool_hash(&self) -> Result<u64> {
|
||||
Ok(self.require_mempool()?.next_block_hash())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user