From: Steve Myers Date: Tue, 1 Oct 2024 15:16:52 +0000 (-0500) Subject: Merge bitcoindevkit/bdk#1594: Replace trait `AnchorFromBlockPosition` with new struct X-Git-Tag: v1.0.0-beta.5~3 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/database/scripts/enum.TaprootError.html?a=commitdiff_plain;h=139d9719d35e347a0e7d6a4a5af0e96d78533517;p=bdk Merge bitcoindevkit/bdk#1594: Replace trait `AnchorFromBlockPosition` with new struct ab8068b90ee476f8edf7d3d4a21d621818e30969 refactor(chain)!: Replace trait `AnchorFromBlockPosition` with new struct (Jiri Jakes) Pull request description: ### Description This change replaces a way of creating new generic anchor from block and its height. Previous way was using conversion trait, newly it is a struct and `From`. Closes #1266. ### Notes to the reviewers - Removed `tx_pos`: I did not see its relevance (`Anchor` does not give access to it). Was it a relic from the past or something I overlooked? - I put `BlockPosition` into `tx_data_traits.rs` because I believe it should be next to `Anchor`. But then it's not a module just for traits. What would be better place? ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing ACKs for top commit: LagginTimes: ACK ab8068b90ee476f8edf7d3d4a21d621818e30969 LLFourn: ACK ab8068b90ee476f8edf7d3d4a21d621818e30969 Tree-SHA512: 9546ff177247796a36aeec6e015e564fb093cae0fe3b2962520843e8371bf3060f6d62f676a3989a49a6c25da6b7adbcde47c5fffe2f772f871980eb77cd1aea --- 139d9719d35e347a0e7d6a4a5af0e96d78533517