]> Untitled Git - bdk/commitdiff
Merge bitcoindevkit/bdk#2100: Make mining more flexible in `bdk_testenv` master github/master
authormerge-script <hello@evanlinjin.me>
Thu, 5 Mar 2026 22:49:33 +0000 (22:49 +0000)
committermerge-script <hello@evanlinjin.me>
Thu, 5 Mar 2026 22:49:33 +0000 (22:49 +0000)
9b1111fd18eed69839ca10e8cacb3b513a8a7aa4 feat(testenv): add `mine_block` with custom timestamp and coinbase address (志宇)

Pull request description:

  ### Description

  Add `mine_block` to `bdk_testenv::Env` with custom timestamp and coinbase address. This allows us to test timelocked transactions.

  ### Changelog notice

  ```md
  Added
  - `mine_block` method to `bdk_testenv::Env` with custom `MineParams`. Blocks can be mined with no transactions, contain custom timestamp and custom coinbase address.
  - `min_time_for_next_block` and `get_block_template` helper methods.
  ```

  ### Checklists

  #### All Submissions:

  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)

  #### New Features:

  * [x] I've added tests for the new feature
  * [x] I've added docs for the new feature

ACKs for top commit:
  oleonardolima:
    ACK 9b1111fd18eed69839ca10e8cacb3b513a8a7aa4

Tree-SHA512: 97d839a2c57fef1fab354ce082d309c1ffd4166cacc437454e0baddd9b682dabdfe4aac99f1095e2da6ec0f520c6e84825b9a719f764ea4435deeac61524e33d


Trivial merge