Skip to content

Commit 7448a99

Browse files
committed
ci fixes
1 parent 9ff7463 commit 7448a99

File tree

5 files changed

+54
-49
lines changed

5 files changed

+54
-49
lines changed

.github/workflows/cont_integration.yml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -166,30 +166,3 @@ jobs:
166166
name: Clippy Results
167167
args: --all-features --all-targets -- -D warnings
168168

169-
build-examples:
170-
needs: prepare
171-
name: Build & Test Examples
172-
runs-on: ubuntu-latest
173-
strategy:
174-
matrix:
175-
example-dir:
176-
- example_cli
177-
- example_bitcoind_rpc_polling
178-
- example_electrum
179-
- example_esplora
180-
steps:
181-
- name: checkout
182-
uses: actions/checkout@v4
183-
with:
184-
persist-credentials: false
185-
- name: Install Rust toolchain
186-
uses: actions-rs/toolchain@v1
187-
with:
188-
toolchain: ${{ needs.prepare.outputs.rust_version }}
189-
override: true
190-
profile: minimal
191-
- name: Rust Cache
192-
uses: Swatinem/[email protected]
193-
- name: Build
194-
working-directory: examples/${{ matrix.example-dir }}
195-
run: cargo build

crates/chain/src/indexed_tx_graph.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ where
8181
/// # Example
8282
///
8383
/// ```
84-
/// use bdk_chain::{IndexedTxGraph, keychain_txout::KeychainTxOutIndex, BlockId};
84+
/// use bdk_chain::{keychain_txout::KeychainTxOutIndex, BlockId, IndexedTxGraph};
8585
///
8686
/// let index = KeychainTxOutIndex::<&str>::new(10, true);
8787
/// let graph = IndexedTxGraph::<BlockId, _>::new(index);

crates/chain/src/tx_graph.rs

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,19 +1268,32 @@ impl<A: Anchor> TxGraph<A> {
12681268
/// # Example
12691269
///
12701270
/// ```
1271-
/// use bdk_chain::{tx_graph::TxGraph, BlockId, CanonicalizationParams};
12721271
/// use bdk_chain::local_chain::LocalChain;
1273-
/// use bitcoin::{OutPoint, TxOut, Amount};
1272+
/// use bdk_chain::{tx_graph::TxGraph, BlockId, CanonicalizationParams};
1273+
/// use bitcoin::{Amount, OutPoint, TxOut};
12741274
/// use std::sync::Arc;
12751275
///
12761276
/// let mut graph = TxGraph::<BlockId>::default();
1277-
/// let chain = LocalChain::from_blocks([
1278-
/// (0, bitcoin::constants::genesis_block(bitcoin::Network::Bitcoin).block_hash())
1279-
/// ].into_iter().collect()).unwrap();
1277+
/// let chain = LocalChain::from_blocks(
1278+
/// [(
1279+
/// 0,
1280+
/// bitcoin::constants::genesis_block(bitcoin::Network::Bitcoin).block_hash(),
1281+
/// )]
1282+
/// .into_iter()
1283+
/// .collect(),
1284+
/// )
1285+
/// .unwrap();
12801286
///
12811287
/// // Get unspent outputs
12821288
/// let outpoints = vec![(0, OutPoint::default())];
1283-
/// let utxos: Vec<_> = graph.filter_chain_unspents(&chain, chain.tip().block_id(), CanonicalizationParams::default(), outpoints).collect();
1289+
/// let utxos: Vec<_> = graph
1290+
/// .filter_chain_unspents(
1291+
/// &chain,
1292+
/// chain.tip().block_id(),
1293+
/// CanonicalizationParams::default(),
1294+
/// outpoints,
1295+
/// )
1296+
/// .collect();
12841297
/// ```
12851298
///
12861299
/// [`try_filter_chain_unspents`]: Self::try_filter_chain_unspents
@@ -1354,17 +1367,29 @@ impl<A: Anchor> TxGraph<A> {
13541367
/// # Example
13551368
///
13561369
/// ```
1357-
/// use bdk_chain::{tx_graph::TxGraph, Balance, BlockId, CanonicalizationParams};
13581370
/// use bdk_chain::local_chain::LocalChain;
1371+
/// use bdk_chain::{tx_graph::TxGraph, Balance, BlockId, CanonicalizationParams};
13591372
/// use bitcoin::OutPoint;
13601373
///
13611374
/// let graph = TxGraph::<BlockId>::default();
1362-
/// let chain = LocalChain::from_blocks([
1363-
/// (0, bitcoin::constants::genesis_block(bitcoin::Network::Bitcoin).block_hash())
1364-
/// ].into_iter().collect()).unwrap();
1375+
/// let chain = LocalChain::from_blocks(
1376+
/// [(
1377+
/// 0,
1378+
/// bitcoin::constants::genesis_block(bitcoin::Network::Bitcoin).block_hash(),
1379+
/// )]
1380+
/// .into_iter()
1381+
/// .collect(),
1382+
/// )
1383+
/// .unwrap();
13651384
///
13661385
/// let outpoints = vec![(0, OutPoint::default())];
1367-
/// let balance = graph.balance(&chain, chain.tip().block_id(), CanonicalizationParams::default(), outpoints, |_, _| true);
1386+
/// let balance = graph.balance(
1387+
/// &chain,
1388+
/// chain.tip().block_id(),
1389+
/// CanonicalizationParams::default(),
1390+
/// outpoints,
1391+
/// |_, _| true,
1392+
/// );
13681393
/// ```
13691394
///
13701395
/// [`try_balance`]: Self::try_balance

crates/electrum/src/bdk_electrum_client.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl<E: ElectrumApi> BdkElectrumClient<E> {
3232
/// # Example
3333
///
3434
/// ```no_run
35-
/// use bdk_electrum::{BdkElectrumClient, electrum_client};
35+
/// use bdk_electrum::{electrum_client, BdkElectrumClient};
3636
///
3737
/// let client = electrum_client::Client::new("ssl://electrum.blockstream.info:50002")?;
3838
/// let bdk_client = BdkElectrumClient::new(client);
@@ -103,14 +103,18 @@ impl<E: ElectrumApi> BdkElectrumClient<E> {
103103
/// # Example
104104
///
105105
/// ```no_run
106+
/// use bdk_core::{spk_client::FullScanRequest, BlockId, CheckPoint};
106107
/// use bdk_electrum::BdkElectrumClient;
107-
/// use bdk_core::spk_client::FullScanRequest;
108108
/// # use bdk_electrum::electrum_client;
109+
/// # use electrum_client::bitcoin::{constants, Network};
109110
///
110111
/// # let client = electrum_client::Client::new("ssl://electrum.blockstream.info:50002")?;
111112
/// # let bdk_client = BdkElectrumClient::new(client);
112113
/// let request = FullScanRequest::<&str>::builder()
113-
/// .chain_tip(Default::default())
114+
/// .chain_tip(CheckPoint::new(BlockId {
115+
/// height: 0,
116+
/// hash: constants::genesis_block(Network::Bitcoin).block_hash(),
117+
/// }))
114118
/// .build();
115119
///
116120
/// let response = bdk_client.full_scan(request, 10, 50, false)?;
@@ -203,9 +207,9 @@ impl<E: ElectrumApi> BdkElectrumClient<E> {
203207
/// # Example
204208
///
205209
/// ```no_run
206-
/// use bdk_electrum::BdkElectrumClient;
207-
/// use bdk_core::spk_client::SyncRequest;
208210
/// use bdk_core::bitcoin::ScriptBuf;
211+
/// use bdk_core::spk_client::SyncRequest;
212+
/// use bdk_electrum::BdkElectrumClient;
209213
/// # use bdk_electrum::electrum_client;
210214
///
211215
/// # let client = electrum_client::Client::new("ssl://electrum.blockstream.info:50002")?;

crates/esplora/src/blocking_ext.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,18 @@ pub trait EsploraExt {
2929
/// # Example
3030
///
3131
/// ```no_run
32-
/// use bdk_esplora::{EsploraExt, esplora_client};
32+
/// use bdk_core::bitcoin::{constants, Network};
3333
/// use bdk_core::spk_client::FullScanRequest;
34-
/// use bdk_core::bitcoin::Network;
34+
/// use bdk_core::{BlockId, CheckPoint};
35+
/// use bdk_esplora::{esplora_client, EsploraExt};
3536
///
36-
/// let client = esplora_client::Builder::new("https://blockstream.info/api")
37-
/// .build_blocking();
37+
/// let client = esplora_client::Builder::new("https://blockstream.info/api").build_blocking();
3838
///
3939
/// let request = FullScanRequest::<&str>::builder()
40-
/// .chain_tip(Default::default())
40+
/// .chain_tip(CheckPoint::new(BlockId {
41+
/// height: 0,
42+
/// hash: constants::genesis_block(Network::Bitcoin).block_hash(),
43+
/// }))
4144
/// .build();
4245
///
4346
/// let response = client.full_scan(request, 10, 5)?;

0 commit comments

Comments
 (0)