-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #1416: [chain] Change tx_last_seen to
Option<u64>
af75817 ref(tx_graph): Change last_seen to `HashMap<Txid, u64>` (valued mammal) 6204d2c feat(tx_graph): Add method `txs_with_no_anchor_or_last_seen` (valued mammal) 496601b test(tx_graph): Add test for `list_canonical_txs` (valued mammal) c405729 wallet: delete method `insert_anchor` (valued mammal) b34790c ref(tx_graph)!: Rename `list_chain_txs` to `list_canonical_txs` (valued mammal) 2ce4bb4 test(indexed_tx_graph): Add test_get_chain_position (valued mammal) 36f5887 test(wallet): Add test_insert_tx_balance_and_utxos (valued mammal) bbc19c3 fix(tx_graph)!: Change tx_last_seen to `Option<u64>` (valued mammal) 324eeb3 fix(wallet)!: Rework `Wallet::insert_tx` to no longer insert anchors (valued mammal) Pull request description: The PR changes the type of last_seen to `Option<u64>` for `txs` member of `TxGraph`. This fixes an issue where unbroadcast and otherwise non-canonical transactions were returned from methods `list_chain_txs` and `Wallet::transactions` because every new tx inserted had a last_seen of 0 making it appear unconfirmed. fixes #1446 fixes #1396 ### Notes to the reviewers ### Changelog notice Changed - Member `last_seen_unconfirmed` of `TxNode` is changed to `Option<u64>` - Renamed `TxGraph` method `list_chain_txs` to `list_canonical_txs` - Changed `Wallet::insert_tx` to take a single `tx: Transaction` as parameter Added - Add method `txs_with_no_anchor_or_last_seen` for `TxGraph` - Add method `unbroadcast_transactions` for `Wallet` ### 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: * [x] 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: notmandatory: Re ACK af75817 Tree-SHA512: e664b3b49e2f547873923f15dffbbc7fa032b6240e5b856b180e9e26123ca141864d10448912dc4a31bbb200c75bef4251a910a4330dac17ee6841b564612d13
- Loading branch information
Showing
13 changed files
with
566 additions
and
346 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.