ouroboros-network- A networking layer for the Ouroboros blockchain protocol
Safe HaskellNone




localStateQueryClient ∷ ∀ block point query result m. Applicative m ⇒ [(Maybe point, query result)] → LocalStateQueryClient block point query m [(Maybe point, Either AcquireFailure result)] Source #

An example LocalStateQueryClient, which, for each point in the given list, acquires the state for that point, and if that succeeds, returns the result for the corresponding query. When the state could not be acquired, the AcquireFailure is returned instead of the query results.

localStateQueryServer ∷ ∀ block point query m state. Applicative m ⇒ (Maybe point → Either AcquireFailure state) → (∀ result. state → query result → result) → LocalStateQueryServer block point query m () Source #

An example LocalStateQueryServer. The first function is called to acquire a state, after which the second will be used to query the state.