ghassmo 5 лет назад
Родитель
Сommit
e0cb31d983
6 измененных файлов с 8 добавлено и 9 удалено
  1. 1 1
      src/bin/cashierd.rs
  2. 3 3
      src/bin/darkfid.rs
  3. 0 1
      src/cli/drk_cli.rs
  4. 1 2
      src/crypto/merkle_node.rs
  5. 2 1
      src/service/btc.rs
  6. 1 1
      src/wallet/walletdb.rs

+ 1 - 1
src/bin/cashierd.rs

@@ -1,5 +1,5 @@
 use std::net::SocketAddr;
-use async_std::sync::{Arc, Mutex};
+use async_std::sync::Arc;
 
 use std::{path::Path, path::PathBuf};
 //use toml;

+ 3 - 3
src/bin/darkfid.rs

@@ -155,7 +155,7 @@ pub async fn futures_broker(
     deposit_recv: async_channel::Receiver<jubjub::SubgroupPoint>,
     cashier_deposit_addr_send: async_channel::Sender<Option<bitcoin::util::address::Address>>,
     withdraw_recv: async_channel::Receiver<WithdrawParams>,
-    cashier_withdraw_send: async_channel::Sender<jubjub::SubgroupPoint>,
+    _cashier_withdraw_send: async_channel::Sender<jubjub::SubgroupPoint>,
     publish_tx_recv: async_channel::Receiver<TransferParams>,
 ) -> Result<()> {
     loop {
@@ -173,8 +173,8 @@ pub async fn futures_broker(
             withdraw_params = withdraw_recv.recv().fuse() => {
                 let withdraw_params = withdraw_params?;
 
-                let btc_address = bitcoin::util::address::Address::from_str(&withdraw_params.pub_key);
-                let amount = withdraw_params.amount;
+                let _btc_address = bitcoin::util::address::Address::from_str(&withdraw_params.pub_key);
+                let _amount = withdraw_params.amount;
 
                 // cashier_withdraw_send.send(address).await?;
 

+ 0 - 1
src/cli/drk_cli.rs

@@ -213,7 +213,6 @@ impl DrkCli {
                 }
                 if let Some(amount) = transfer_sub.value_of("amount") {
                     trn.amount = amount.parse().expect("couldn't convert the amount to f64");
-;
                 }
                 transfer = Some(trn);
             }

+ 1 - 2
src/crypto/merkle_node.rs

@@ -5,8 +5,7 @@ use lazy_static::lazy_static;
 use std::io;
 
 use super::{coin::Coin, merkle::Hashable};
-use crate::impl_vec;
-use crate::serial::{Decodable, Encodable, VarInt};
+use crate::serial::{Decodable, Encodable};
 use crate::{Error, Result};
 
 pub const SAPLING_COMMITMENT_TREE_DEPTH: usize = 32;

+ 2 - 1
src/service/btc.rs

@@ -1,4 +1,4 @@
-use crate::{serial::deserialize, serial::serialize, Error, Result};
+use crate::Result;
 
 use rand::distributions::Alphanumeric;
 use rand::{thread_rng, Rng};
@@ -19,6 +19,7 @@ pub type PubAddress = Address;
 pub type PubKey = PublicKey;
 pub type PrivKey = PrivateKey;
 
+#[allow(dead_code)]
 pub struct BitcoinKeys {
     scheduler: AsyncScheduler,
     secret_key: SecretKey,

+ 1 - 1
src/wallet/walletdb.rs

@@ -1,7 +1,6 @@
 use crate::crypto::{coin::Coin, merkle::IncrementalWitness, merkle_node::MerkleNode, note::Note};
 use crate::serial;
 use crate::serial::{deserialize, serialize, Decodable, Encodable};
-use crate::util::join_config_path;
 use crate::{Error, Result};
 
 use async_std::sync::{Arc, Mutex};
@@ -325,6 +324,7 @@ impl WalletDb {
 mod tests {
 
     use super::*;
+    use crate::util::join_config_path;
     use ff::PrimeField;
 
     #[test]