From 91ee5116338cafa678aeb0c2016b523e6705b946 Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 24 May 2022 15:29:52 +0000 Subject: [PATCH] Publish autogenerated nightly docs --- .../nightly/latest/bdk/database/index.html | 2 +- .../bdk/database/struct.SqliteDatabase.html | 66 +++++++++---------- .../bdk/database/trait.BatchDatabase.html | 2 +- .../bdk/database/trait.BatchOperations.html | 2 +- .../latest/bdk/database/trait.Database.html | 2 +- .../latest/src/bdk/database/mod.rs.html | 4 +- .../latest/src/bdk/database/sqlite.rs.html | 22 ++++++- 7 files changed, 61 insertions(+), 39 deletions(-) diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/database/index.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/database/index.html index a67eb2ff2a..1930cb485e 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/database/index.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/database/index.html @@ -6,7 +6,7 @@ logo

Module database

logo
-

Module bdk::database

source · []
Expand description

Database types

+

Module bdk::database

source · []
Expand description

Database types

This module provides the implementation of some defaults database types, along with traits that can be implemented externally to let Wallets use customized databases.

It’s important to note that the databases defined here only contains “blockchain-related” data. diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/database/struct.SqliteDatabase.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/database/struct.SqliteDatabase.html index aca9731f24..6f8d8fcb86 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/database/struct.SqliteDatabase.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/database/struct.SqliteDatabase.html @@ -6,7 +6,7 @@ logo

SqliteDatabase

logo
pub struct SqliteDatabase {
+    

Struct bdk::database::SqliteDatabase

source · []
pub struct SqliteDatabase {
     pub path: String,
     pub connection: Connection,
 }
Expand description

Sqlite database stored on filesystem

@@ -14,43 +14,43 @@ crate::database

Fields

path: String

Path on the local filesystem to store the sqlite file

connection: Connection

A rusqlite connection object to the sqlite database

-

Implementations

Instantiate a new SqliteDatabase instance by creating a connection +

Implementations

Instantiate a new SqliteDatabase instance by creating a connection to the database stored at path

-

Trait Implementations

Container for the operations

-

Create a new batch container

-

Consume and apply a batch of operations

-

Store a script_pubkey along with its keychain and child number.

-

Store a LocalUtxo

-

Store a raw transaction

-

Store the metadata of a transaction

-

Store the last derivation index for a given keychain.

-

Store the sync time

-

Delete a script_pubkey given the keychain and its child number.

-

Delete the data related to a specific script_pubkey, meaning the keychain and the child +

Trait Implementations

Container for the operations

+

Create a new batch container

+

Consume and apply a batch of operations

+

Store a script_pubkey along with its keychain and child number.

+

Store a LocalUtxo

+

Store a raw transaction

+

Store the metadata of a transaction

+

Store the last derivation index for a given keychain.

+

Store the sync time

+

Delete a script_pubkey given the keychain and its child number.

+

Delete the data related to a specific script_pubkey, meaning the keychain and the child number. Read more

-

Delete a LocalUtxo given its [OutPoint]

-

Delete a raw transaction given its [Txid]

-

Delete the metadata of a transaction and optionally the raw transaction itself

-

Delete the last derivation index for a keychain.

-

Reset the sync time to None Read more

+

Delete a LocalUtxo given its [OutPoint]

+

Delete a raw transaction given its [Txid]

+

Delete the metadata of a transaction and optionally the raw transaction itself

+

Delete the last derivation index for a keychain.

+

Reset the sync time to None Read more

Type that contains the configuration

Create a new instance given a configuration

-

Read and checks the descriptor checksum for a given keychain. Read more

-

Return the list of script_pubkeys

-

Return the list of LocalUtxos

-

Return the list of raw transactions

-

Return the list of transactions metadata

-

Fetch a script_pubkey given the child number of a keychain.

-

Fetch the keychain and child number of a given script_pubkey

-

Fetch a LocalUtxo given its [OutPoint]

-

Fetch a raw transaction given its [Txid]

-

Fetch the transaction metadata and optionally also the raw transaction

-

Return the last derivation index for a keychain.

-

Return the sync time, if present

-

Increment the last derivation index for a keychain and return it Read more

-
👎 Deprecated since 0.18.0:

The flush function is only needed for the sled database on mobile, instead for mobile use the sqlite database.

+

Read and checks the descriptor checksum for a given keychain. Read more

+

Return the list of script_pubkeys

+

Return the list of LocalUtxos

+

Return the list of raw transactions

+

Return the list of transactions metadata

+

Fetch a script_pubkey given the child number of a keychain.

+

Fetch the keychain and child number of a given script_pubkey

+

Fetch a LocalUtxo given its [OutPoint]

+

Fetch a raw transaction given its [Txid]

+

Fetch the transaction metadata and optionally also the raw transaction

+

Return the last derivation index for a keychain.

+

Return the sync time, if present

+

Increment the last derivation index for a keychain and return it Read more

+
👎 Deprecated since 0.18.0:

The flush function is only needed for the sled database on mobile, instead for mobile use the sqlite database.

Force changes to be written to disk

-

Formats the value using the given formatter. Read more

+

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/database/trait.BatchDatabase.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/database/trait.BatchDatabase.html index 1590e261a9..60bfc27192 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/database/trait.BatchDatabase.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/database/trait.BatchDatabase.html @@ -15,5 +15,5 @@

Associated Types

Container for the operations

Required methods

Create a new batch container

Consume and apply a batch of operations

-

Implementations on Foreign Types

Implementors

+

Implementations on Foreign Types

Implementors

\ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/database/trait.BatchOperations.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/database/trait.BatchOperations.html index aae3081f04..e266fa2f27 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/database/trait.BatchOperations.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/database/trait.BatchOperations.html @@ -38,5 +38,5 @@ number.

Delete the last derivation index for a keychain.

Reset the sync time to None

Returns the removed value

-

Implementations on Foreign Types

Implementors

+

Implementations on Foreign Types

Implementors

\ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/database/trait.Database.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/database/trait.Database.html index a637367168..d603e45a9b 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/database/trait.Database.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/bdk/database/trait.Database.html @@ -43,5 +43,5 @@ next time.

👎 Deprecated since 0.18.0:

The flush function is only needed for the sled database on mobile, instead for mobile use the sqlite database.

Force changes to be written to disk

Implementations on Foreign Types

👎 Deprecated since 0.18.0:

The flush function is only needed for the sled database on mobile, instead for mobile use the sqlite database.

-

Implementors

+

Implementors

\ No newline at end of file diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/database/mod.rs.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/database/mod.rs.html index d13633c833..58a75a025e 100644 --- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/database/mod.rs.html +++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/database/mod.rs.html @@ -428,6 +428,7 @@ 421 422 423 +424
// Bitcoin Dev Kit
 // Written in 2020 by Alekos Filini <alekos.filini@gmail.com>
 //
@@ -753,7 +754,8 @@
         };
 
         tree.set_utxo(&utxo).unwrap();
-
+        tree.set_utxo(&utxo).unwrap();
+        assert_eq!(tree.iter_utxos().unwrap().len(), 1);
         assert_eq!(tree.get_utxo(&outpoint).unwrap(), Some(utxo));
     }
 
diff --git a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/database/sqlite.rs.html b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/database/sqlite.rs.html
index 618cb33406..4958db56f4 100644
--- a/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/database/sqlite.rs.html
+++ b/docs/.vuepress/public/docs-rs/bdk/nightly/latest/src/bdk/database/sqlite.rs.html
@@ -1028,6 +1028,16 @@
 1021
 1022
 1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
 
// Bitcoin Dev Kit
 // Written in 2020 by Alekos Filini <alekos.filini@gmail.com>
 //
@@ -1071,6 +1081,16 @@
     "INSERT INTO transaction_details SELECT txid, timestamp, received, sent, fee, height FROM transaction_details_old;",
     "DROP TABLE transaction_details_old;",
     "ALTER TABLE utxos ADD COLUMN is_spent;",
+    // drop all data due to possible inconsistencies with duplicate utxos, re-sync required
+    "DELETE FROM checksums;",
+    "DELETE FROM last_derivation_indices;",
+    "DELETE FROM script_pubkeys;",
+    "DELETE FROM sync_time;",
+    "DELETE FROM transaction_details;",
+    "DELETE FROM transactions;",
+    "DELETE FROM utxos;",
+    "DROP INDEX idx_txid_vout;",
+    "CREATE UNIQUE INDEX idx_utxos_txid_vout ON utxos(txid, vout);"
 ];
 
 /// Sqlite database stored on filesystem
@@ -1116,7 +1136,7 @@
         script: &[u8],
         is_spent: bool,
     ) -> Result<i64, Error> {
-        let mut statement = self.connection.prepare_cached("INSERT INTO utxos (value, keychain, vout, txid, script, is_spent) VALUES (:value, :keychain, :vout, :txid, :script, :is_spent)")?;
+        let mut statement = self.connection.prepare_cached("INSERT INTO utxos (value, keychain, vout, txid, script, is_spent) VALUES (:value, :keychain, :vout, :txid, :script, :is_spent) ON CONFLICT(txid, vout) DO UPDATE SET value=:value, keychain=:keychain, script=:script, is_spent=:is_spent")?;
         statement.execute(named_params! {
             ":value": value,
             ":keychain": keychain,
-- 
2.49.0