]> Untitled Git - bdk/commit
Merge bitcoindevkit/bdk#704: Fix `rpc::CoreTxIter` logic.
authorAlekos Filini <alekos.filini@gmail.com>
Tue, 9 Aug 2022 09:49:26 +0000 (11:49 +0200)
committerAlekos Filini <alekos.filini@gmail.com>
Tue, 9 Aug 2022 09:49:56 +0000 (11:49 +0200)
commitd9adfbe04732eb28a232aa3ea3c49b735960efc4
tree0a7ded87988cc6a6a85402111c2ed85d6fa60b40
parent03d3c786f2e3ce4c6481005b9abf18cfac242aa7
parent74e2c477f124489a2357921ca879cc82e24da5fd
Merge bitcoindevkit/bdk#704: Fix `rpc::CoreTxIter` logic.

74e2c477f124489a2357921ca879cc82e24da5fd Replace `rpc::CoreTxIter` with `list_transactions` fn. (志宇)

Pull request description:

  ### Description

  This fixes a bug where `CoreTxIter` attempts to call `listtransactions` immediately after a tx result is filtered (instead of being returned), when in fact, the correct logic will be to pop another tx result.

  The new logic also ensures that tx results are returned in chonological order. The test `test_list_transactions` verifies this. We also now ensure that `page_size` is between the range `[0 to 1000]` otherwise an error is returned.

  Some needless cloning is removed from `from_config` as well as logging improvements.

  ### Notes to the reviewers

  This is an oversight by me (sorry) for PR #683

  ### 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

  #### Bugfixes:

  ~* [ ] This pull request breaks the existing API~
  * [x] I've added tests to reproduce the issue which are now passing
  * [x] I'm linking the issue being fixed by this PR

ACKs for top commit:
  afilini:
    ACK 74e2c477f124489a2357921ca879cc82e24da5fd

Tree-SHA512: f32314a9947067673d19d95da8cde36b350c0bb0ebe0924405ad50602c14590f7ccb09a3e03cdfdd227f938dccd0f556f3a2b4dd7fdd6eba1591c0f8d3e65182