Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
EventStore *eventstore.Store
PushCore *pushcore.Client
CheckInterval time.Duration
MaxEventAge time.Duration // Events older than this are deleted (default: 1h).
Logger zerolog.Logger
}
Config holds configuration for the expiry sweeper.
type Sweeper ¶
type Sweeper struct {
// contains filtered or unexported fields
}
Sweeper periodically drops events that have expired or grown too old. Two deletion triggers:
- Block-based: events past their ExpiryBlockHeight (KEY events have a protocol-driven expiry; SIGN events have ExpiryBlockHeight=0 and skip).
- Age-based: only UNSIGNED events (status CONFIRMED or IN_PROGRESS) older than MaxEventAge. SIGNED and later statuses carry local commitments and are preserved.
Dropping is safe because push chain is the source of truth: if a dropped event is still pending on push chain, the push chain pending-tx parser re-populates it on its next poll. Anything truly stale (no longer pending upstream) stays dropped, which is the desired cleanup behaviour.
Click to show internal directories.
Click to hide internal directories.