]> Untitled Git - bdk/commitdiff
add details to TODO, format doc example
authorRiccardo Casatta <riccardo@casatta.it>
Fri, 4 Jun 2021 13:05:35 +0000 (15:05 +0200)
committerRiccardo Casatta <riccardo@casatta.it>
Fri, 4 Jun 2021 13:05:35 +0000 (15:05 +0200)
src/blockchain/rpc.rs

index 1c4c6cf6cb623dc718406a0d5a58668a54af1949..40ec0ae651facd9d7bfabddf7e72157c1b9deeff 100644 (file)
 //! ```no_run
 //! # use bdk::blockchain::{RpcConfig, RpcBlockchain, ConfigurableBlockchain};
 //! let config = RpcConfig {
-//!             url: "127.0.0.1:18332".to_string(),
-//!             auth: bitcoincore_rpc::Auth::CookieFile("/home/user/.bitcoin/.cookie".into()),
-//!             network: bdk::bitcoin::Network::Testnet,
-//!             wallet_name: "wallet_name".to_string(),
-//!             skip_blocks: None,
-//!         };
+//!     url: "127.0.0.1:18332".to_string(),
+//!     auth: bitcoincore_rpc::Auth::CookieFile("/home/user/.bitcoin/.cookie".into()),
+//!     network: bdk::bitcoin::Network::Testnet,
+//!     wallet_name: "wallet_name".to_string(),
+//!     skip_blocks: None,
+//! };
 //! let blockchain = RpcBlockchain::from_config(&config);
 //! ```
 
@@ -227,7 +227,9 @@ impl Blockchain for RpcBlockchain {
                     timestamp: tx_result.info.time,
                     received,
                     sent,
-                    fees: tx_result.fee.map(|f| f.as_sat().abs() as u64).unwrap_or(0), //TODO
+                    //TODO it could happen according to the node situation/configuration that the
+                    // fee is not known [TransactionDetails:fee] should be made [Option]
+                    fees: tx_result.fee.map(|f| f.as_sat().abs() as u64).unwrap_or(0),
                     height: tx_result.info.blockheight,
                 };
                 debug!(