Page MenuHomePhabricator

[Chronik] Move `chronik-plugin` to `chronik-plugin-impl`, add `chronik-plugin` multiplex crate
ClosedPublic

Authored by tobias_ruck on Feb 6 2024, 09:48.

Details

Summary

Currently, using chronik-plugin in the indexer is a bit tedious, as everything has to be #[cfg(feature = "plugins")] gated, which is hard to maintain.

Instead, we move the current chronik-plugin to chronik-plugin-impl, which is then re-exported in a new chronik-plugin crate if the plugins feature is enabled, and otherwise it exports fallback structs.

Depends on D15394.

Test Plan

ninja check-functional

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Failed tests logs:

====== Get blocktxs and tx: "before each" hook for "After some txs have been broadcast".Get blocktxs and tx "before each" hook for "After some txs have been broadcast" ======
Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/work/modules/chronik-client/test/integration/blocktxs_and_tx_and_rawtx.ts)
    at listOnTimeout (node:internal/timers:559:17)
    at processTimers (node:internal/timers:502:7)

Each failure log is accessible here:
Get blocktxs and tx: "before each" hook for "After some txs have been broadcast".Get blocktxs and tx "before each" hook for "After some txs have been broadcast"

This revision is now accepted and ready to land.Feb 12 2024, 11:28