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
Lint
Lint Not Applicable
Unit
Tests Not Applicable