Documentation
¶
Index ¶
- type Store
- func (s *Store) CountInProgress() (int64, error)
- func (s *Store) GetBroadcastedSignEvents(limit int) ([]store.Event, error)
- func (s *Store) GetEvent(eventID string) (*store.Event, error)
- func (s *Store) GetExpiredConfirmedEvents(currentBlock uint64, limit int) ([]store.Event, error)
- func (s *Store) GetInFlightSignEvents() ([]store.Event, error)
- func (s *Store) GetNonExpiredConfirmedEvents(currentBlock, minBlockConfirmation uint64, limit int) ([]store.Event, error)
- func (s *Store) GetSignedSignEvents(limit int) ([]store.Event, error)
- func (s *Store) ResetInProgressEventsToConfirmed() (int64, error)
- func (s *Store) Update(eventID string, fields map[string]any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store provides database access for TSS events.
func (*Store) CountInProgress ¶ added in v0.0.14
CountInProgress returns the number of events with status IN_PROGRESS. Used by the coordinator to cap how many new events to fetch.
func (*Store) GetBroadcastedSignEvents ¶ added in v0.0.16
GetBroadcastedSignEvents returns SIGN events with status BROADCASTED (for receipt check).
func (*Store) GetExpiredConfirmedEvents ¶ added in v0.0.16
GetExpiredConfirmedEvents returns CONFIRMED events past their expiry block.
func (*Store) GetInFlightSignEvents ¶ added in v0.0.16
GetInFlightSignEvents returns SIGN events that are currently IN_PROGRESS or SIGNED. BROADCASTED events are excluded because they are already submitted to chain; the pending nonce RPC accounts for them in the mempool, and including them here would make the coordinator wait for the resolver unnecessarily.
func (*Store) GetNonExpiredConfirmedEvents ¶ added in v0.0.16
func (s *Store) GetNonExpiredConfirmedEvents(currentBlock, minBlockConfirmation uint64, limit int) ([]store.Event, error)
GetNonExpiredConfirmedEvents returns confirmed events ready to be processed. Events must be at least minBlockConfirmation blocks old and not past expiry.
func (*Store) GetSignedSignEvents ¶ added in v0.0.16
GetSignedSignEvents returns SIGN events with status SIGNED (ready to be broadcast).
func (*Store) ResetInProgressEventsToConfirmed ¶ added in v0.0.13
ResetInProgressEventsToConfirmed resets all IN_PROGRESS events to CONFIRMED status. Called on node startup to recover from crashes mid-session.
func (*Store) Update ¶ added in v0.0.16
Update applies field updates to an event by ID. Returns an error if the event is not found.
Example usage:
s.Update(id, map[string]any{"status": store.StatusInProgress})
s.Update(id, map[string]any{"status": store.StatusConfirmed, "block_height": newHeight})
s.Update(id, map[string]any{"broadcasted_tx_hash": txHash})