]> Untitled Git - bdk/commit
refactor(chain)!: impl sqlite for ConfirmationBlockTime anchored changesets
authornymius <155548262+nymius@users.noreply.github.com>
Wed, 27 Nov 2024 01:05:08 +0000 (22:05 -0300)
committernymius <155548262+nymius@users.noreply.github.com>
Wed, 4 Dec 2024 17:14:09 +0000 (14:14 -0300)
commitb587b0fcadcc61b9f46336ffee5621363e409092
tree4fd1391d6a3aa52a60f4b6ff3fbd2db80b5ac46b
parentf6c1c61e7611966e20a88aace932a08aabd543f2
refactor(chain)!: impl sqlite for ConfirmationBlockTime anchored changesets

We want to not depend on serde_json. If we keep it around for
serializing anchors we won't be able to remove it in the future because
it will always be needed to do migrations.
Currently there is only one widely used anchor, ConfirmationBlockTime.

The desicion was to constrain support to just be for a single anchor
type ConfirmationBlockTime. The anchor table will represent all fields
of ConfirmationBlockTime, each one in its own column.

The reasons:

- No one is using rusqlite with any other anchor type, and if they are,
  they can do something custom anyway.
- The anchor representation may change in the future, supporting for
  multiple Anchor types here will cause more problems for migration
  later on.
crates/chain/src/rusqlite_impl.rs