mirror of
https://github.com/RoboSats/taptrade-core.git
synced 2025-07-19 01:03:30 +00:00
run cargo fix coordinator
This commit is contained in:
@ -8,7 +8,7 @@ use bdk::bitcoin::{OutPoint, Transaction};
|
|||||||
use bdk::bitcoin::{TxIn, Txid};
|
use bdk::bitcoin::{TxIn, Txid};
|
||||||
use bdk::bitcoincore_rpc::{Client, RpcApi};
|
use bdk::bitcoincore_rpc::{Client, RpcApi};
|
||||||
use std::collections::{HashMap, HashSet};
|
use std::collections::{HashMap, HashSet};
|
||||||
use std::net::Shutdown;
|
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
use std::sync::RwLock;
|
use std::sync::RwLock;
|
||||||
use tokio::sync::oneshot;
|
use tokio::sync::oneshot;
|
||||||
|
@ -6,8 +6,8 @@ pub mod tx_confirmation_monitoring;
|
|||||||
|
|
||||||
use self::coordinator_utils::*;
|
use self::coordinator_utils::*;
|
||||||
use super::*;
|
use super::*;
|
||||||
use bitcoin::key;
|
|
||||||
use musig2::{AggNonce, KeyAggContext, PartialSignature};
|
use musig2::{KeyAggContext, PartialSignature};
|
||||||
|
|
||||||
pub async fn process_order(
|
pub async fn process_order(
|
||||||
coordinator: Arc<Coordinator>,
|
coordinator: Arc<Coordinator>,
|
||||||
@ -330,7 +330,7 @@ pub async fn handle_payout_signature(
|
|||||||
coordinator: Arc<Coordinator>,
|
coordinator: Arc<Coordinator>,
|
||||||
) -> Result<bool, RequestError> {
|
) -> Result<bool, RequestError> {
|
||||||
let database = &coordinator.coordinator_db;
|
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?;
|
check_offer_and_confirmation(&payload.offer_id_hex, &payload.robohash_hex, database).await?;
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
use axum::Json;
|
|
||||||
use bdk::{
|
use bdk::{
|
||||||
bitcoin::Txid,
|
bitcoin::Txid,
|
||||||
bitcoincore_rpc::{
|
bitcoincore_rpc::{
|
||||||
jsonrpc::error::RpcError, jsonrpc::Error as JsonRpcError, Error as CoreRpcError, RpcApi,
|
jsonrpc::Error as JsonRpcError, Error as CoreRpcError, RpcApi,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
mod db_tests;
|
mod db_tests;
|
||||||
|
|
||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
use coordinator::coordinator_utils::*;
|
|
||||||
use futures_util::StreamExt;
|
use futures_util::StreamExt;
|
||||||
use musig2::PartialSignature;
|
|
||||||
use sha2::digest::typenum::marker_traits;
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use bdk::bitcoin::address::Address;
|
use bdk::bitcoin::address::Address;
|
||||||
|
@ -4,7 +4,7 @@ mod database;
|
|||||||
mod wallet;
|
mod wallet;
|
||||||
|
|
||||||
use anyhow::{anyhow, Result};
|
use anyhow::{anyhow, Result};
|
||||||
use bdk::{database::MemoryDatabase, sled};
|
use bdk::{database::MemoryDatabase};
|
||||||
use communication::{api::*, api_server, communication_utils::*, handler_errors::*};
|
use communication::{api::*, api_server, communication_utils::*, handler_errors::*};
|
||||||
use coordinator::{
|
use coordinator::{
|
||||||
bond_monitoring::*, coordinator_utils::*,
|
bond_monitoring::*, coordinator_utils::*,
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
use super::*;
|
use super::*;
|
||||||
use bdk::{
|
use bdk::{
|
||||||
bitcoin::{psbt::PartiallySignedTransaction, PublicKey},
|
bitcoin::{psbt::PartiallySignedTransaction},
|
||||||
descriptor::{policy, Descriptor},
|
descriptor::{Descriptor},
|
||||||
miniscript::{descriptor::TapTree, policy::Concrete, Miniscript, Tap, ToPublicKey},
|
miniscript::{descriptor::TapTree, policy::Concrete, Tap, ToPublicKey},
|
||||||
SignOptions,
|
SignOptions,
|
||||||
};
|
};
|
||||||
use musig2::{secp256k1::PublicKey as MuSig2PubKey, KeyAggContext};
|
use musig2::{secp256k1::PublicKey as MuSig2PubKey, KeyAggContext};
|
||||||
use sha2::digest::typenum::{bit, Xor};
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct EscrowPsbtConstructionData {
|
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");
|
warn!("Implement escrow psbt validation. For now, returning Ok");
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,6 @@ use bdk::{
|
|||||||
bip32::ExtendedPrivKey,
|
bip32::ExtendedPrivKey,
|
||||||
consensus::encode::deserialize,
|
consensus::encode::deserialize,
|
||||||
key::{secp256k1, XOnlyPublicKey},
|
key::{secp256k1, XOnlyPublicKey},
|
||||||
taproot::TapLeaf,
|
|
||||||
Address,
|
Address,
|
||||||
Network::Regtest,
|
Network::Regtest,
|
||||||
Transaction,
|
Transaction,
|
||||||
@ -23,7 +22,7 @@ use bdk::{
|
|||||||
bitcoincore_rpc::{Client, RawTx, RpcApi},
|
bitcoincore_rpc::{Client, RawTx, RpcApi},
|
||||||
blockchain::{rpc::Auth, Blockchain, ConfigurableBlockchain, RpcBlockchain, RpcConfig},
|
blockchain::{rpc::Auth, Blockchain, ConfigurableBlockchain, RpcBlockchain, RpcConfig},
|
||||||
database::MemoryDatabase,
|
database::MemoryDatabase,
|
||||||
sled::{self, Tree},
|
sled::{Tree},
|
||||||
template::Bip86,
|
template::Bip86,
|
||||||
wallet::verify::*,
|
wallet::verify::*,
|
||||||
KeychainKind, SyncOptions, Wallet,
|
KeychainKind, SyncOptions, Wallet,
|
||||||
|
Reference in New Issue
Block a user