Page MenuHomePhabricator

[Chronik] Add `bitcoinsuite_core::Tx` et al., move away from `chronik_bridge::ffi::Tx` et al.
ClosedPublic

Authored by tobias_ruck on Apr 1 2023, 22:32.

Details

Summary

Using the ffi structs directly everywhere is a bit crude, e.g. the txid is [u8; 32] and not TxId.

The new structs are kept very close to those in ffi, with a few differences:

  1. Coin is optional, this is so we can eventually parse txs, which doesn't contain the coin.
  2. We have both Tx and TxMut, one to build txs and the other one as immutable struct for them. Tx auto-derefs to TxMut, so anything taking &self that we add to TxMut will also work for Tx.

Depends on D13530.

Test Plan

ninja check-crates && ninja check-functional

Diff Detail

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