Onchain.RPC.SyncStatus (onchain v0.16.0)

Copy Markdown View Source

Progress object from eth_syncing.

execution-apis v1.0.0-beta.7 defines SyncingStatus as one union: the boolean false when the node is not syncing, or this object. false is not a t/0. The three fields are the spec's quantity properties (startingBlock, currentBlock, highestBlock), decoded to integers. Fields the schema does not name are ignored, so a client snap-sync object still yields this struct.

Summary

Functions

Decodes the sync-progress object from the eth_syncing spec example shape.

Types

t()

@type t() :: %Onchain.RPC.SyncStatus{
  current_block: non_neg_integer(),
  highest_block: non_neg_integer(),
  starting_block: non_neg_integer()
}

Functions

deserialize(map)

@spec deserialize(map()) :: t()

Decodes the sync-progress object from the eth_syncing spec example shape.