| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Plutus.ChainIndex.SyncStats
Synopsis
- data SyncStats = SyncStats {}
- data SyncLog = SyncLog {}
- data SyncState
- isSyncStateSynced :: SyncState -> Bool
- isSyncStateNotSyncing :: SyncState -> Bool
- isSyncStateSyncing :: SyncState -> Bool
- logProgress :: forall effs. Member (LogMsg SyncLog) effs => [ChainSyncEvent] -> TimeSpec -> Eff effs ()
- getSyncStateFromStats :: SyncStats -> SyncState
- getSyncState :: Point -> Point -> SyncState
- convertEventToSyncStats :: ChainSyncEvent -> SyncStats
Documentation
Constructors
| SyncStats | |
Fields
| |
Instances
| Eq SyncStats Source # | |
| Show SyncStats Source # | |
| Generic SyncStats Source # | |
| Semigroup SyncStats Source # | |
| Monoid SyncStats Source # | |
| ToJSON SyncStats Source # | |
| FromJSON SyncStats Source # | |
| ToObject SyncStats Source # | |
Defined in Plutus.ChainIndex.SyncStats | |
| type Rep SyncStats Source # | |
Defined in Plutus.ChainIndex.SyncStats type Rep SyncStats = D1 ('MetaData "SyncStats" "Plutus.ChainIndex.SyncStats" "plutus-chain-index-1.1.0.0-KDkoMMh6X2yB1S5IHvoANH" 'False) (C1 ('MetaCons "SyncStats" 'PrefixI 'True) ((S1 ('MetaSel ('Just "syncStatsAppliedBlocks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer) :*: S1 ('MetaSel ('Just "syncStatsAppliedRollbacks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)) :*: (S1 ('MetaSel ('Just "syncStatsChainSyncPoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Point) :*: S1 ('MetaSel ('Just "syncStatsNodePoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Point)))) | |
Constructors
| SyncLog | |
Fields
| |
Instances
| Eq SyncLog Source # | |
| Show SyncLog Source # | |
| Generic SyncLog Source # | |
| ToJSON SyncLog Source # | |
| FromJSON SyncLog Source # | |
| Pretty SyncLog Source # | |
| ToObject SyncLog Source # | |
Defined in Plutus.ChainIndex.SyncStats | |
| type Rep SyncLog Source # | |
Defined in Plutus.ChainIndex.SyncStats type Rep SyncLog = D1 ('MetaData "SyncLog" "Plutus.ChainIndex.SyncStats" "plutus-chain-index-1.1.0.0-KDkoMMh6X2yB1S5IHvoANH" 'False) (C1 ('MetaCons "SyncLog" 'PrefixI 'True) (S1 ('MetaSel ('Just "syncStateSyncLog") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SyncState) :*: (S1 ('MetaSel ('Just "syncStatsSyncLog") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SyncStats) :*: S1 ('MetaSel ('Just "syncPeriodSyncLog") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Second)))) | |
Constructors
| Synced | |
| Syncing Double | |
| NotSyncing |
Instances
| Eq SyncState Source # | |
| Show SyncState Source # | |
| Generic SyncState Source # | |
| ToJSON SyncState Source # | |
| FromJSON SyncState Source # | |
| Pretty SyncState Source # | |
| ToObject SyncState Source # | |
Defined in Plutus.ChainIndex.SyncStats | |
| type Rep SyncState Source # | |
Defined in Plutus.ChainIndex.SyncStats type Rep SyncState = D1 ('MetaData "SyncState" "Plutus.ChainIndex.SyncStats" "plutus-chain-index-1.1.0.0-KDkoMMh6X2yB1S5IHvoANH" 'False) (C1 ('MetaCons "Synced" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Syncing" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Double)) :+: C1 ('MetaCons "NotSyncing" 'PrefixI 'False) (U1 :: Type -> Type))) | |
isSyncStateSynced :: SyncState -> Bool Source #
isSyncStateSyncing :: SyncState -> Bool Source #
logProgress :: forall effs. Member (LogMsg SyncLog) effs => [ChainSyncEvent] -> TimeSpec -> Eff effs () Source #
Log syncing summary.
getSyncStateFromStats :: SyncStats -> SyncState Source #
Get the SyncState for a SyncState.
TODO: The syncing percentage is valid when the node is already fully synced. But when the node and chain-index are started at the same time, the syncing percentage is not a valid number considering the actual tip of the node. Find a better way to calculate this percentage.