Page MenuHomePhabricator

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

Authored by tobias_ruck on Feb 24 2024, 14:05.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
chronik-refactor-bridge_block
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 27384
Build 54331: Build Diffchronik-client-integration-tests · build-chronik-plugins · build-chronik
Build 54330: arc lint + arc unit