forked from erigontech/erigon
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proper Caplin's subscription listen (erigontech#9734)
## Subscription system Sentinel has a time-based subscription system, which means that subscriptions persists only until a specific point in time is reached. ```go= func (sub *GossipSubscription) OverwriteSubscriptionExpiry(expiry time.Time) { sub.expiration.Store(expiry) } ``` All gossip topics are joined which means we can publish at all times, but not all gossip topics are listened to, which means we are not listening for all topic's subscriptions. calling the function above will keep make Caplin listen to that topic until `expiry`is reached. once rached, the listener will be closed **but we can still publish** if we set the expiry, so that now we need to listen again, then we will revive the subscription.
- Loading branch information
1 parent
af429b8
commit ac1b139
Showing
5 changed files
with
76 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters