]> Untitled Git - bdk/commitdiff
test(chain): use ChangeSet<ConfirmationBlockTime> instead of ChangeSet<BlockId>
authornymius <155548262+nymius@users.noreply.github.com>
Fri, 29 Nov 2024 15:58:40 +0000 (12:58 -0300)
committernymius <155548262+nymius@users.noreply.github.com>
Wed, 4 Dec 2024 17:14:24 +0000 (14:14 -0300)
The only struct implementing rustqlite is
ChangeSet<ConfirmationBlockTime> from
c49ea85423a20ebc29e3bf4ae3a6d2acdc78b8a5 on.

crates/chain/src/rusqlite_impl.rs

index f3abca0f250a4777fdffb4322491a2d663bae55c..346cee7926f5bd88bb75fb1790ae6b462c2ae55a 100644 (file)
@@ -549,7 +549,7 @@ mod test {
 
     #[test]
     fn can_persist_anchors_and_txs_independently() -> anyhow::Result<()> {
-        type ChangeSet = tx_graph::ChangeSet<BlockId>;
+        type ChangeSet = tx_graph::ChangeSet<ConfirmationBlockTime>;
         let mut conn = rusqlite::Connection::open_in_memory()?;
 
         // init tables
@@ -567,9 +567,12 @@ mod test {
         };
         let tx = Arc::new(tx);
         let txid = tx.compute_txid();
-        let anchor = BlockId {
-            height: 21,
-            hash: hash!("anchor"),
+        let anchor = ConfirmationBlockTime {
+            block_id: BlockId {
+                height: 21,
+                hash: hash!("anchor"),
+            },
+            confirmation_time: 1342,
         };
 
         // First persist the anchor