run cargo fix coordinator

This commit is contained in:
f321x
2024-08-16 13:39:44 +02:00
parent 45defac1c0
commit 498d86e4c7
7 changed files with 16 additions and 17 deletions

View File

@ -8,7 +8,7 @@ use bdk::bitcoin::{OutPoint, Transaction};
use bdk::bitcoin::{TxIn, Txid};
use bdk::bitcoincore_rpc::{Client, RpcApi};
use std::collections::{HashMap, HashSet};
use std::net::Shutdown;
use std::ops::Deref;
use std::sync::RwLock;
use tokio::sync::oneshot;

View File

@ -6,8 +6,8 @@ pub mod tx_confirmation_monitoring;
use self::coordinator_utils::*;
use super::*;
use bitcoin::key;
use musig2::{AggNonce, KeyAggContext, PartialSignature};
use musig2::{KeyAggContext, PartialSignature};
pub async fn process_order(
coordinator: Arc<Coordinator>,
@ -330,7 +330,7 @@ pub async fn handle_payout_signature(
coordinator: Arc<Coordinator>,
) -> Result<bool, RequestError> {
let database = &coordinator.coordinator_db;
let wallet = &coordinator.coordinator_wallet;
let _wallet = &coordinator.coordinator_wallet;
check_offer_and_confirmation(&payload.offer_id_hex, &payload.robohash_hex, database).await?;

View File

@ -1,10 +1,10 @@
use std::str::FromStr;
use axum::Json;
use bdk::{
bitcoin::Txid,
bitcoincore_rpc::{
jsonrpc::error::RpcError, jsonrpc::Error as JsonRpcError, Error as CoreRpcError, RpcApi,
jsonrpc::Error as JsonRpcError, Error as CoreRpcError, RpcApi,
},
};

View File

@ -2,10 +2,10 @@
mod db_tests;
use anyhow::Context;
use coordinator::coordinator_utils::*;
use futures_util::StreamExt;
use musig2::PartialSignature;
use sha2::digest::typenum::marker_traits;
use super::*;
use bdk::bitcoin::address::Address;

View File

@ -4,7 +4,7 @@ mod database;
mod wallet;
use anyhow::{anyhow, Result};
use bdk::{database::MemoryDatabase, sled};
use bdk::{database::MemoryDatabase};
use communication::{api::*, api_server, communication_utils::*, handler_errors::*};
use coordinator::{
bond_monitoring::*, coordinator_utils::*,

View File

@ -1,12 +1,12 @@
use super::*;
use bdk::{
bitcoin::{psbt::PartiallySignedTransaction, PublicKey},
descriptor::{policy, Descriptor},
miniscript::{descriptor::TapTree, policy::Concrete, Miniscript, Tap, ToPublicKey},
bitcoin::{psbt::PartiallySignedTransaction},
descriptor::{Descriptor},
miniscript::{descriptor::TapTree, policy::Concrete, Tap, ToPublicKey},
SignOptions,
};
use musig2::{secp256k1::PublicKey as MuSig2PubKey, KeyAggContext};
use sha2::digest::typenum::{bit, Xor};
#[derive(Debug)]
pub struct EscrowPsbtConstructionData {
@ -226,7 +226,7 @@ impl<D: bdk::database::BatchDatabase> CoordinatorWallet<D> {
})
}
pub async fn validate_escrow_init_psbt(&self, escrow_init_psbt: &str) -> Result<()> {
pub async fn validate_escrow_init_psbt(&self, _escrow_init_psbt: &str) -> Result<()> {
warn!("Implement escrow psbt validation. For now, returning Ok");
Ok(())
}

View File

@ -15,7 +15,6 @@ use bdk::{
bip32::ExtendedPrivKey,
consensus::encode::deserialize,
key::{secp256k1, XOnlyPublicKey},
taproot::TapLeaf,
Address,
Network::Regtest,
Transaction,
@ -23,7 +22,7 @@ use bdk::{
bitcoincore_rpc::{Client, RawTx, RpcApi},
blockchain::{rpc::Auth, Blockchain, ConfigurableBlockchain, RpcBlockchain, RpcConfig},
database::MemoryDatabase,
sled::{self, Tree},
sled::{Tree},
template::Bip86,
wallet::verify::*,
KeychainKind, SyncOptions, Wallet,