rename "parameterized replaceable" to "addressable".

This commit is contained in:
Asai Toshiya
2025-01-24 01:06:08 +09:00
committed by fiatjaf_
parent 548abb5d4a
commit fcf10541c8
2 changed files with 8 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
import { Event } from './core.ts'
import { isParameterizedReplaceableKind, isReplaceableKind } from './kinds.ts'
import { isAddressableKind, isReplaceableKind } from './kinds.ts'
export type Filter = {
ids?: string[]
@@ -98,7 +98,7 @@ export function getFilterLimit(filter: Filter): number {
: Infinity,
// Parameterized replaceable events are limited by the number of authors, kinds, and "d" tags.
filter.authors?.length && filter.kinds?.every(kind => isParameterizedReplaceableKind(kind)) && filter['#d']?.length
filter.authors?.length && filter.kinds?.every(kind => isAddressableKind(kind)) && filter['#d']?.length
? filter.authors.length * filter.kinds.length * filter['#d'].length
: Infinity,
)