Skip to content

Commit 2576ce7

Browse files
committed
database: rename kind_author_tags_index field to param_replaceable_index in InternalDatabaseIndexes
Signed-off-by: Yuki Kishimoto <[email protected]>
1 parent 141c782 commit 2576ce7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/nostr-database/src/index.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ struct InternalDatabaseIndexes {
427427
ids_index: HashMap<EventId, ArcEventIndex>,
428428
author_index: HashMap<PublicKeyPrefix, BTreeSet<ArcEventIndex>>,
429429
kind_author_index: HashMap<(Kind, PublicKeyPrefix), BTreeSet<ArcEventIndex>>,
430-
kind_author_tags_index:
430+
param_replaceable_index:
431431
HashMap<(Kind, PublicKeyPrefix, [u8; TAG_INDEX_VALUE_SIZE]), ArcEventIndex>,
432432
deleted_ids: HashSet<EventId>,
433433
deleted_coordinates: HashMap<Coordinate, Timestamp>,
@@ -577,7 +577,7 @@ impl InternalDatabaseIndexes {
577577

578578
if kind.is_parameterized_replaceable() {
579579
if let Some(identifier) = e.tags.identifier() {
580-
self.kind_author_tags_index
580+
self.param_replaceable_index
581581
.insert((kind, pubkey_prefix, identifier), e.clone());
582582
}
583583
}
@@ -612,7 +612,7 @@ impl InternalDatabaseIndexes {
612612

613613
if ev.kind.is_parameterized_replaceable() {
614614
if let Some(identifier) = ev.tags.identifier() {
615-
self.kind_author_tags_index
615+
self.param_replaceable_index
616616
.remove(&(ev.kind, ev.pubkey, identifier));
617617
}
618618
}
@@ -726,7 +726,7 @@ impl InternalDatabaseIndexes {
726726
}
727727

728728
let ev = self
729-
.kind_author_tags_index
729+
.param_replaceable_index
730730
.get(&(kind, author, identifier))?;
731731

732732
if self.deleted_ids.contains(&ev.event_id) {

0 commit comments

Comments
 (0)