[docs] Format code in docs with '--config format_code_in_doc_comments=true'

This commit is contained in:
Steve Myers
2020-12-16 14:19:37 -08:00
parent fb5c70fc64
commit 2325a1fcc2
8 changed files with 88 additions and 36 deletions

View File

@@ -75,7 +75,13 @@
//! # use bdk::Wallet;
//! let config = serde_json::from_str("...")?;
//! let blockchain = AnyBlockchain::from_config(&config)?;
//! let wallet = Wallet::new("...", None, Network::Testnet, MemoryDatabase::default(), blockchain)?;
//! let wallet = Wallet::new(
//! "...",
//! None,
//! Network::Testnet,
//! MemoryDatabase::default(),
//! blockchain,
//! )?;
//! # Ok::<(), bdk::Error>(())
//! ```

View File

@@ -50,11 +50,13 @@
//!
//! let mempool = Arc::new(Mempool::default());
//! let peers = (0..num_threads)
//! .map(|_| Peer::connect(
//! "btcd-mainnet.lightning.computer:8333",
//! Arc::clone(&mempool),
//! Network::Bitcoin,
//! ))
//! .map(|_| {
//! Peer::connect(
//! "btcd-mainnet.lightning.computer:8333",
//! Arc::clone(&mempool),
//! Network::Bitcoin,
//! )
//! })
//! .collect::<Result<_, _>>()?;
//! let blockchain = CompactFiltersBlockchain::new(peers, "./wallet-filters", Some(500_000))?;
//! # Ok::<(), CompactFiltersError>(())

View File

@@ -370,7 +370,7 @@ fn save_transaction_details_and_utxos<D: BatchDatabase>(
sent: outgoing,
height,
timestamp,
fees: inputs_sum.saturating_sub(outputs_sum), // if the tx is a coinbase, fees would be negative
fees: inputs_sum.saturating_sub(outputs_sum), /* if the tx is a coinbase, fees would be negative */
};
updates.set_tx(&tx_details)?;