perf: coordinate unknown id lookups
This is a huge improvement over what it was before. Now all unknown id lookups are debounced and happen through a central coordinator. This ensures there is no duplication between timelines. Fixes: https://github.com/damus-io/notedeck/issues/279 Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -5,14 +5,14 @@ use nostr::bech32::Hrp;
|
||||
use std::fmt;
|
||||
use tracing::debug;
|
||||
|
||||
#[derive(Debug, Eq, PartialEq, Clone, Hash)]
|
||||
#[derive(Debug, Eq, PartialEq, Clone, Copy, Hash)]
|
||||
pub struct Pubkey([u8; 32]);
|
||||
|
||||
static HRP_NPUB: Hrp = Hrp::parse_unchecked("npub");
|
||||
|
||||
impl Pubkey {
|
||||
pub fn new(data: &[u8; 32]) -> Self {
|
||||
Self(*data)
|
||||
pub fn new(data: [u8; 32]) -> Self {
|
||||
Self(data)
|
||||
}
|
||||
|
||||
pub fn hex(&self) -> String {
|
||||
|
||||
Reference in New Issue
Block a user