mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Rename to set_topic_validator and add test
This commit is contained in:
@ -161,7 +161,7 @@ class Pubsub:
|
||||
# Force context switch
|
||||
await asyncio.sleep(0)
|
||||
|
||||
def add_topic_validator(
|
||||
def set_topic_validator(
|
||||
self, topic: str, validator: ValidatorFn, is_async_validator: bool
|
||||
) -> None:
|
||||
self.topic_validators[topic] = TopicValidator(validator, is_async_validator)
|
||||
|
||||
Reference in New Issue
Block a user