From: Steve Myers Date: Mon, 9 Oct 2023 20:46:48 +0000 (-0500) Subject: Merge bitcoindevkit/bdk#1041: Add `bitcoind_rpc` chain source module. X-Git-Tag: v1.0.0-alpha.2~2 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/database/scripts/struct.Standard.html?a=commitdiff_plain;h=38d69c947c4925d0692bce45e0033c1a432910c1;p=bdk Merge bitcoindevkit/bdk#1041: Add `bitcoind_rpc` chain source module. 85c62532a55cfc94eade4d20ca3075dc4cd4882e docs(bitcoind_rpc): better `Emitter::mempool` explanation (志宇) b69c13ddf6aa7cfb9be8c841b255e7f5f13ad328 example_bitcoind_rpc: tweaks (志宇) 5f34df8489fedae2aa3fd001036cc9ef6abe9a7a bitcoind_rpc!: bring back `CheckPoint`s to `Emitter` (志宇) 57590e0a1f2dad09a63fadb11f01e9f704cdcffb bitcoind_rpc: rm `BlockHash` from `Emitter::last_mempool_tip` (志宇) 6d4b33ef91a6c3e3443f6321cf3e3d186f77c595 chain: split `IndexedTxGraph::insert_tx` into 3 methods (志宇) 4f5695d43add3eab37ab12e897ac7c49f0d0787e chain: improvements to `IndexedTxGraph` and `TxGraph` APIs (志宇) 150d6f8ab6cd1eb1c9448d61e7bd71db0dd32a01 feat(example_bitcoind_rpc_polling): add example for RPC polling (志宇) 4f10463d9eaad9365b87dd99d49f0ddb8be673ee test(bitcoind_rpc): add no_agreement_point test (志宇) a73dac2d91b29c4ba05f606f81e511fbf1f9ec7f test(bitcoind_rpc): initial tests for `Emitter` (志宇) bb7424d11d3a4bd837ddde0f42f9abd93d56aee1 feat(bitcoind_rpc): introduce `bitcoind_rpc` crate (志宇) 240657b1674ad901c77090ee1fa96dc0d71e91d7 chain: add batch-insert methods for `IndexedTxGraph` (志宇) 43bc813c6498b5b021d70a6127ff7e57d7337813 chain: add helper methods on `CheckPoint` (志宇) b3db5ca9df4302fddcd5474569849371f2be7e2d feat(chain): add `AnchorFromBlockPosition` trait (志宇) f795a43cc72fdb4ef26ca349c4cb4f4bfd3b90b5 feat(example_cli): allow chain specific args in examples (志宇) Pull request description: ### Description This PR builds on top of #1034 and adds the `bitcoind_rpc` chain-src module and example. ### Notes to the reviewers Don't merge this until #1034 is in! ### Changelog notice * Add `bitcoind_rpc` chain-source module. * Add `example_bitcoind_rpc` example module. * Add `AnchorFromBlockPosition` trait which are for anchors that can be constructed from a given block, height and position in block. * Add helper methods to `IndexedTxGraph` and `TxGraph` for batch operations and applying blocks directly. * Add helper methods to `CheckPoint` for easier construction from a block `Header`. ### Checklists * [x] Add test: we should detect when an initially-confirmed transaction is "unconfirmed" during a reorg. * [x] Improve `example_bitcoind_rpc`: add `live` command. * [x] Improve docs. * [x] Reintroduce `CheckPoint`. #### 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 #### New Features: * [x] I've added tests for the new feature * [x] I've added docs for the new feature ACKs for top commit: notmandatory: Re ACK 85c62532a55cfc94eade4d20ca3075dc4cd4882e Tree-SHA512: 88dbafbebaf227b18c69f2ea884e3e586bf9c11e5e450eb4872ade1d1ccd5cf1e33ce9930a6f5aa918baa3e92add7503858b039b8c9d553a281ad6d833f08a49 --- 38d69c947c4925d0692bce45e0033c1a432910c1