Missing type annotation keychain (#1152)

This commit is contained in:
Quentin Le Sceller 2018-06-08 15:59:59 -04:00 committed by Ignotus Peverell
parent d07c5a128a
commit 310c7b0b48

View file

@ -49,6 +49,7 @@ use daemonize::Daemonize;
use config::GlobalConfig; use config::GlobalConfig;
use core::core::amount_to_hr_string; use core::core::amount_to_hr_string;
use core::global; use core::global;
use keychain::ExtKeychain;
use tui::ui; use tui::ui;
use util::{init_logger, LoggingConfig, LOGGER}; use util::{init_logger, LoggingConfig, LOGGER};
use wallet::{libwallet, FileWallet}; use wallet::{libwallet, FileWallet};
@ -422,9 +423,10 @@ fn server_command(server_args: Option<&ArgMatches>, mut global_config: GlobalCon
let _ = thread::Builder::new() let _ = thread::Builder::new()
.name("wallet_listener".to_string()) .name("wallet_listener".to_string())
.spawn(move || { .spawn(move || {
let wallet = FileWallet::new(wallet_config.clone(), "").unwrap_or_else(|e| { let wallet: FileWallet<ExtKeychain> = FileWallet::new(wallet_config.clone(), "")
panic!("Error creating wallet: {:?} Config: {:?}", e, wallet_config) .unwrap_or_else(|e| {
}); panic!("Error creating wallet: {:?} Config: {:?}", e, wallet_config)
});
wallet::controller::foreign_listener(wallet, &wallet_config.api_listen_addr()) wallet::controller::foreign_listener(wallet, &wallet_config.api_listen_addr())
.unwrap_or_else(|e| { .unwrap_or_else(|e| {
panic!( panic!(
@ -539,9 +541,10 @@ fn wallet_command(wallet_args: &ArgMatches, global_config: GlobalConfig) {
// Handle listener startup commands // Handle listener startup commands
{ {
let wallet = FileWallet::new(wallet_config.clone(), passphrase).unwrap_or_else(|e| { let wallet: FileWallet<ExtKeychain> = FileWallet::new(wallet_config.clone(), passphrase)
panic!("Error creating wallet: {:?} Config: {:?}", e, wallet_config) .unwrap_or_else(|e| {
}); panic!("Error creating wallet: {:?} Config: {:?}", e, wallet_config)
});
match wallet_args.subcommand() { match wallet_args.subcommand() {
("listen", Some(listen_args)) => { ("listen", Some(listen_args)) => {
if let Some(port) = listen_args.value_of("port") { if let Some(port) = listen_args.value_of("port") {
@ -569,9 +572,10 @@ fn wallet_command(wallet_args: &ArgMatches, global_config: GlobalConfig) {
// Handle single-use (command line) owner commands // Handle single-use (command line) owner commands
{ {
let mut wallet = FileWallet::new(wallet_config.clone(), passphrase).unwrap_or_else(|e| { let mut wallet: FileWallet<ExtKeychain> =
panic!("Error creating wallet: {:?} Config: {:?}", e, wallet_config) FileWallet::new(wallet_config.clone(), passphrase).unwrap_or_else(|e| {
}); panic!("Error creating wallet: {:?} Config: {:?}", e, wallet_config)
});
let _res = wallet::controller::owner_single_use(&mut wallet, |api| { let _res = wallet::controller::owner_single_use(&mut wallet, |api| {
match wallet_args.subcommand() { match wallet_args.subcommand() {
("send", Some(send_args)) => { ("send", Some(send_args)) => {