90dd86be9a
* Re-org internal descriptor `CanonicalDesc` as `PivotArc` why: Despite its name, `CanonicalDesc` contained a cursor arc (or leg) from the base tree with a designated block (or Header) on its arc members (aka blocks.) The type is used more generally than only for s block on the canonical cursor. Also, the `PivotArc` provides some more fields for caching intermediate data. This simplifies managing extra arguments for some functions. * Remove cruft details: No need to find cursor arc if it is given as function argument. * Rename prototype variables `head: PivotArc` to `pvarc` why: Better reading * Function and code massage, adjust names details: Avoid the syllable `canonical` in function names that do not strictly apply to the canonical chain. So renaming * findCanonicalHead() => findCursorArc() * canonicalChain() => findHeader() * trimCanonicalChain() => trimCursorArc() * Combine `updateBase()` function-args into single `PivotArgs` object why: Will generalise action for more complex scenarios in future. * update `calculateNewBase()` return code type => `PivotArc` why: So it can directly be used as argument into `updateBase()` * Update `calculateNewBase()` for target on parent arc * Update unit tests |
||
---|---|---|
.. | ||
forked_chain | ||
chain_desc.nim | ||
forked_chain.nim | ||
persist_blocks.nim |