HomePhabricator

[Chronik] Refactor: Split `load_block_undo` out of `bridge_block`

Description

[Chronik] Refactor: Split load_block_undo out of bridge_block

Summary:
Currently, the design that bridge_block internally reads the undo data is a bit unintuitive, especially since it doesn't take ChronikBridge as reference nor has "load" in the name.

This diff splits out the loading of the undo data from bridge_block such that bridge_block becomes a completely IO free function that only rearranges the inputs in memory, just like bridge_tx.

load_block_undo now basically does nothing but IO, which also ich much clearer.

Note that we currently "needlessly" put this into ChronikBridge, however, this parallels with load_block, and allows BlockManager to be backported from Core without being blocked by Chronik.

Test Plan: ninja check && ninja check-functional

Reviewers: Fabien, #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

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

Details

Provenance
tobias_ruckAuthored on Feb 24 2024, 14:04
tobias_ruckPushed on Feb 26 2024, 10:57
Reviewer
Restricted Project
Differential Revision
D15537: [Chronik] Refactor: Split `load_block_undo` out of `bridge_block`
Parents
rABCb93b4932dd1c: [cmake] don't include check-electrum in check-all target
Branches
Unknown
Tags
Unknown