Use () to indicate a missing blockchain

So that:
1. There are no runtime errors
2. There less type annotations needed
3. Less traits and stuff to document
This commit is contained in:
LLFourn
2020-12-23 13:48:17 +11:00
parent 2e222c7ad9
commit 656c9c9da8
14 changed files with 105 additions and 119 deletions

View File

@@ -40,7 +40,7 @@ use miniscript::policy::Concrete;
use miniscript::Descriptor;
use bdk::database::memory::MemoryDatabase;
use bdk::{KeychainKind, OfflineWallet, Wallet};
use bdk::{KeychainKind, Wallet};
fn main() {
env_logger::init_from_env(
@@ -98,8 +98,7 @@ fn main() {
Some("regtest") => Network::Regtest,
Some("testnet") | _ => Network::Testnet,
};
let wallet: OfflineWallet<_> =
Wallet::new_offline(&format!("{}", descriptor), None, network, database).unwrap();
let wallet = Wallet::new_offline(&format!("{}", descriptor), None, network, database).unwrap();
info!("... First address: {}", wallet.get_new_address().unwrap());