]> Untitled Git - bdk/commit
feat(chain): refactor `merge_chains`
author志宇 <hello@evanlinjin.me>
Mon, 22 Apr 2024 03:59:18 +0000 (11:59 +0800)
committer志宇 <hello@evanlinjin.me>
Mon, 22 Apr 2024 09:39:06 +0000 (17:39 +0800)
commit96a9aa6e63474dbd93a2ef969eef5b07c79e6491
tree2c704e36ac9ec56cf102c70c972706b4e6909c7c
parent2f22987c9e924800f8682b2dcbdde60fd26b069a
feat(chain): refactor `merge_chains`

`merge_chains` now returns a tuple of the resultant checkpoint AND
changeset. This is arguably a more readable/understandable setup.

To do this, we had to create `CheckPoint::apply_changeset` which is kept
as a private method.

Thank you @ValuedMammal for the suggestion.

Co-authored-by: valuedvalued mammal <valuedmammal@protonmail.com>
crates/chain/src/local_chain.rs