HomePhabricator

[Chronik] Move ffi::Block into chronik-bridge, use CBlockIndex and CBlock

Description

[Chronik] Move ffi::Block into chronik-bridge, use CBlockIndex and CBlock

Summary:

  1. Move ffi::Block from chronik-lib to chronik-bridge. This allows us to use this type in other crates, e.g. chronik-indexer.
  2. Add ffi definitions for CBlockIndex and CBlock so we can use them in Rust.
  3. Expose BridgeBlock through ffi so we can use it in Rust, renamed to bridge_block.
  4. Change handle_block_connected and handle_block_disconnected to take &CBlock and &CBlockIndex.

Test Plan: ninja check-crates && ninja && ./test/functional/test_runner chronik_block

Reviewers: Fabien, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D13276

Details

Provenance
tobias_ruckAuthored on Mar 13 2023, 10:53
tobias_ruckPushed on Mar 13 2023, 11:41
Reviewer
Restricted Project
Differential Revision
D13276: [Chronik] Move ffi::Block into chronik-bridge, use CBlockIndex and CBlock
Parents
rABCfaefb62eb651: refactor, net: Relocate CNode private members and increase data member…
Branches
Unknown
Tags
Unknown