Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data SyncStats = SyncStats { }
- data SyncLog = SyncLog { }
-
data
SyncState
- = Synced
- | Syncing Double
- | NotSyncing
- 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
SyncStats | |
|
Instances
SyncLog | |
|
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.2.0.0-3CbZJi76XkaE20yvLJVl75" '
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
))))
|
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.2.0.0-3CbZJi76XkaE20yvLJVl75" '
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.