diff --git a/chain/src/pipe.rs b/chain/src/pipe.rs index 536875c6..8188d957 100644 --- a/chain/src/pipe.rs +++ b/chain/src/pipe.rs @@ -369,12 +369,16 @@ fn update_head(b: &Block, ctx: &mut BlockContext) -> Result, Error> .map_err(|e| Error::StoreErr(e, "pipe save head".to_owned()))?; } ctx.head = tip.clone(); - info!( + debug!( LOGGER, "Updated head to {} at {}.", b.hash(), b.header.height ); + if b.header.height % 500 == 0 { + info!(LOGGER, "pipe: chain head reached {} @ {} [{}]", + b.header.height, b.header.difficulty, b.hash()); + } Ok(Some(tip)) } else { Ok(None) @@ -388,12 +392,15 @@ fn update_sync_head(bh: &BlockHeader, ctx: &mut BlockContext) -> Result Result { *state = State::Disconnected; - info!(LOGGER, "Client {} connection lost: {:?}", addr, e); + debug!(LOGGER, "Client {} connection lost: {:?}", addr, e); Ok(()) } } diff --git a/wallet/src/receiver.rs b/wallet/src/receiver.rs index c5fa86eb..ee9ba526 100644 --- a/wallet/src/receiver.rs +++ b/wallet/src/receiver.rs @@ -79,6 +79,7 @@ impl Handler for WalletReceiver { if let Ok(Some(partial_tx)) = struct_body { receive_json_tx(&self.config, &self.keychain, &partial_tx) .map_err(|e| { + error!(LOGGER, "Problematic partial tx, looks like this: {:?}", partial_tx); api::Error::Internal( format!("Error processing partial transaction: {:?}", e), )}) diff --git a/wallet/src/sender.rs b/wallet/src/sender.rs index 0a47198f..eef99577 100644 --- a/wallet/src/sender.rs +++ b/wallet/src/sender.rs @@ -93,7 +93,7 @@ pub fn issue_send_tx( } } } else { - panic!("dest not in expected format: {}", dest); + panic!("dest formatted as {} but send -d expected stdout or http://IP:port", dest); } Ok(()) } @@ -115,7 +115,7 @@ fn build_send_tx( // select some spendable coins from the wallet let coins = WalletData::read_wallet(&config.data_file_dir, |wallet_data| { - wallet_data.select( + wallet_data.select_coins( key_id.clone(), amount, current_height, @@ -155,7 +155,7 @@ pub fn issue_burn_tx( // select some spendable coins from the wallet let coins = WalletData::read_wallet(&config.data_file_dir, |wallet_data| { - wallet_data.select( + wallet_data.select_coins( key_id.clone(), amount, current_height, diff --git a/wallet/src/types.rs b/wallet/src/types.rs index dd274173..5ea66395 100644 --- a/wallet/src/types.rs +++ b/wallet/src/types.rs @@ -516,7 +516,7 @@ impl WalletData { /// Default strategy is to spend the maximum number of outputs (up to max_outputs). /// Alternative strategy is to spend smallest outputs first but only as many as necessary. /// When we introduce additional strategies we should pass something other than a bool in. - pub fn select( + pub fn select_coins( &self, root_key_id: keychain::Identifier, amount: u64,