]> Untitled Git - bdk/commitdiff
Merge bitcoindevkit/bdk#1594: Replace trait `AnchorFromBlockPosition` with new struct
authorSteve Myers <steve@notmandatory.org>
Tue, 1 Oct 2024 15:16:52 +0000 (10:16 -0500)
committerSteve Myers <steve@notmandatory.org>
Tue, 1 Oct 2024 15:17:23 +0000 (10:17 -0500)
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

1  2 
crates/chain/src/indexed_tx_graph.rs
crates/chain/src/tx_data_traits.rs

Simple merge
Simple merge