Browse Source

Add and run dprint fmt

bdk-0.11
Philipp Hoenisch 4 years ago
committed by Lucas Soriano del Pino
parent
commit
45c8d05ceb
No known key found for this signature in database GPG Key ID: EE611E973A1530E7
  1. 40
      cfd_protocol/src/lib.rs
  2. 1
      docs/roadmap.md
  3. 14
      dprint.json

40
cfd_protocol/src/lib.rs

@ -1,26 +1,22 @@
use anyhow::bail;
use anyhow::Context;
use anyhow::Result;
use anyhow::{bail, Context, Result};
use bdk::bitcoin::hashes::*;
use bdk::bitcoin::Script;
use bdk::bitcoin::hashes::hex::ToHex;
use bdk::bitcoin::util::bip143::SigHashCache;
use bdk::bitcoin::util::psbt::{Global, PartiallySignedTransaction};
use bdk::bitcoin::{
self, Address, Amount, Network, OutPoint, PublicKey, SigHash, SigHashType, Transaction, TxIn,
TxOut,
};
use bdk::database::BatchDatabase;
use bdk::descriptor::Descriptor;
use bdk::miniscript::descriptor::Wsh;
use bdk::miniscript::DescriptorTrait;
use bdk::wallet::AddressIndex;
use bdk::{
bitcoin::{
self, hashes::hex::ToHex, util::bip143::SigHashCache, util::psbt::Global,
util::psbt::PartiallySignedTransaction, Address, Amount, Network, OutPoint, PublicKey,
SigHash, SigHashType, Transaction, TxIn, TxOut,
},
descriptor::Descriptor,
miniscript::{descriptor::Wsh, DescriptorTrait},
};
use bitcoin::PrivateKey;
use itertools::Itertools;
use secp256k1_zkp::EcdsaAdaptorSignature;
use secp256k1_zkp::SecretKey;
use secp256k1_zkp::SECP256K1;
use secp256k1_zkp::{self, schnorrsig, Signature};
use secp256k1_zkp::{self, schnorrsig, EcdsaAdaptorSignature, SecretKey, Signature, SECP256K1};
use std::collections::HashMap;
/// In satoshi per vbyte.
@ -826,11 +822,11 @@ impl LockTransaction {
#[cfg(test)]
mod tests {
use super::*;
use bdk::bitcoin::{util::bip32::ExtendedPrivKey, PrivateKey};
use bdk::bitcoin::util::bip32::ExtendedPrivKey;
use bdk::bitcoin::PrivateKey;
use bdk::wallet::AddressIndex;
use bdk::SignOptions;
use rand::SeedableRng;
use rand::{CryptoRng, RngCore};
use rand::{CryptoRng, RngCore, SeedableRng};
use rand_chacha::ChaChaRng;
#[test]
@ -1231,8 +1227,7 @@ mod tests {
where
R: RngCore + CryptoRng,
{
use bdk::populate_test_db;
use bdk::testutils;
use bdk::{populate_test_db, testutils};
let mut seed = [0u8; 32];
rng.fill_bytes(&mut seed);
@ -1371,8 +1366,7 @@ mod tests {
use secp256k1_zkp::secp256k1_zkp_sys::types::c_void;
use secp256k1_zkp::secp256k1_zkp_sys::CPtr;
use std::os::raw::c_int;
use std::os::raw::c_uchar;
use std::os::raw::{c_int, c_uchar};
use std::ptr;
/// Create a Schnorr signature using the provided nonce instead of generating one.

1
docs/roadmap.md

@ -52,4 +52,3 @@ Constraints:
- Anonymity
- Orderbook
- Multiple makers

14
dprint.json

@ -0,0 +1,14 @@
{
"$schema": "https://dprint.dev/schemas/v0.json",
"incremental": true,
"rustfmt": {
"imports_granularity": "module"
},
"includes": ["**/*.{md,rs,toml}"],
"excludes": ["**/target"],
"plugins": [
"https://plugins.dprint.dev/markdown-0.9.2.wasm",
"https://plugins.dprint.dev/rustfmt-0.4.0.exe-plugin@c6bb223ef6e5e87580177f6461a0ab0554ac9ea6b54f78ea7ae8bf63b14f5bc2",
"https://plugins.dprint.dev/toml-0.4.0.wasm"
]
}
Loading…
Cancel
Save