bcc-cli-1.99.0
Safe HaskellNone
LanguageHaskell2010

Bcc.CLI.Sophie.Run.Query

Synopsis

Documentation

data SophieQueryCmdLocalStateQueryError Source #

An error that can occur while querying a node's local state.

Constructors

AcquireFailureError !AcquireFailure 
EraMismatchError !EraMismatch

A query from a certain era was applied to a ledger from a different era.

ColeProtocolNotSupportedError

The query does not support the Cole protocol.

SophieProtocolEraMismatch

The Sophie protocol only supports the Sophie era.

percentage Source #

Arguments

∷ RelativeTime

tolerance. If b - a < tolerance, then 100% is reported. This even if we are tolerance seconds behind, we are still considered fully synced.

→ RelativeTime

nowTime. The time of the most recently synced block.

→ RelativeTime

tipTime. The time of the tip of the block chain to which we need to sync.

Text 

Calculate the percentage sync rendered as text.

executeQuery ∷ ∀ result era mode. BccEra era → ConsensusModeParams mode → LocalNodeConnectInfo mode → QueryInMode mode (Either EraMismatch result) → ExceptT SophieQueryCmdError IO result Source #