Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sync_from option #11

Merged
merged 5 commits into from
Jan 24, 2024
Merged

Add sync_from option #11

merged 5 commits into from
Jan 24, 2024

Conversation

caike
Copy link
Member

@caike caike commented Jan 19, 2024

  1. Allows syncing from a particular point in the chain.
def start_link(opts) do
  # initial_state = [sync_from: :babbage]
  # initial_state = [sync_from: :origin]
  initial_state = [
    sync_from: %{
      point: %{
        slot: 114_127_654,
        id: "b0ff1e2bfc326a7f7378694b1f2693233058032bfb2798be2992a0db8b143099"
      }
    }
  ]

  opts = Keyword.merge(opts, initial_state)
  Xogmios.start_chain_sync_link(__MODULE__, opts)
end
  1. Fixes a bug where the client would suddenly disconnect. By returning {:reconnect, initial_state} from init/1 it appears to fix the bug.

@caike caike merged commit a851d98 into main Jan 24, 2024
3 checks passed
@caike caike deleted the add-sync-from-option branch July 29, 2024 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant