From b02f3134d873acc24735017645278a16c573f74a Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 8 Aug 2024 07:17:18 +1000 Subject: [PATCH] Run contrib/run-rustfmt.sh No other changes other than those introduced by the script. --- fuzz/src/chanmon_consistency.rs | 4 ++-- fuzz/src/full_stack.rs | 6 +++--- lightning-background-processor/src/lib.rs | 4 ++-- lightning-block-sync/src/gossip.rs | 2 +- lightning-block-sync/src/test_utils.rs | 2 +- lightning/src/ln/interactivetxs.rs | 6 +++--- lightning/src/sign/mod.rs | 6 +++--- lightning/src/sign/taproot.rs | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/fuzz/src/chanmon_consistency.rs b/fuzz/src/chanmon_consistency.rs index 48bd5590b..90e77f345 100644 --- a/fuzz/src/chanmon_consistency.rs +++ b/fuzz/src/chanmon_consistency.rs @@ -21,11 +21,11 @@ use bitcoin::amount::Amount; use bitcoin::constants::genesis_block; use bitcoin::locktime::absolute::LockTime; +use bitcoin::network::Network; use bitcoin::opcodes; use bitcoin::script::{Builder, ScriptBuf}; -use bitcoin::transaction::{Transaction, TxOut}; -use bitcoin::network::Network; use bitcoin::transaction::Version; +use bitcoin::transaction::{Transaction, TxOut}; use bitcoin::hash_types::BlockHash; use bitcoin::hashes::sha256::Hash as Sha256; diff --git a/fuzz/src/full_stack.rs b/fuzz/src/full_stack.rs index 7733e21c8..0a4bb9809 100644 --- a/fuzz/src/full_stack.rs +++ b/fuzz/src/full_stack.rs @@ -14,14 +14,14 @@ //! This test has been very useful, though due to its complexity good starting inputs are critical. use bitcoin::amount::Amount; +use bitcoin::consensus::encode::deserialize; use bitcoin::constants::genesis_block; use bitcoin::locktime::absolute::LockTime; +use bitcoin::network::Network; use bitcoin::opcodes; use bitcoin::script::{Builder, ScriptBuf}; -use bitcoin::transaction::{Transaction, TxOut}; -use bitcoin::consensus::encode::deserialize; -use bitcoin::network::Network; use bitcoin::transaction::Version; +use bitcoin::transaction::{Transaction, TxOut}; use bitcoin::hash_types::{BlockHash, Txid}; use bitcoin::hashes::hex::FromHex; diff --git a/lightning-background-processor/src/lib.rs b/lightning-background-processor/src/lib.rs index d49b8b89f..4d293d4e8 100644 --- a/lightning-background-processor/src/lib.rs +++ b/lightning-background-processor/src/lib.rs @@ -1012,12 +1012,12 @@ impl Drop for BackgroundProcessor { mod tests { use super::{BackgroundProcessor, GossipSync, FRESHNESS_TIMER}; use bitcoin::constants::{genesis_block, ChainHash}; - use bitcoin::locktime::absolute::LockTime; - use bitcoin::transaction::{Transaction, TxOut}; use bitcoin::hashes::Hash; + use bitcoin::locktime::absolute::LockTime; use bitcoin::network::Network; use bitcoin::secp256k1::{PublicKey, Secp256k1, SecretKey}; use bitcoin::transaction::Version; + use bitcoin::transaction::{Transaction, TxOut}; use bitcoin::{Amount, ScriptBuf, Txid}; use core::sync::atomic::{AtomicBool, Ordering}; use lightning::chain::channelmonitor::ANTI_REORG_DELAY; diff --git a/lightning-block-sync/src/gossip.rs b/lightning-block-sync/src/gossip.rs index 72a77d4a9..feb130fe7 100644 --- a/lightning-block-sync/src/gossip.rs +++ b/lightning-block-sync/src/gossip.rs @@ -6,8 +6,8 @@ use crate::{AsyncBlockSourceResult, BlockData, BlockSource, BlockSourceError}; use bitcoin::block::Block; use bitcoin::constants::ChainHash; -use bitcoin::transaction::{OutPoint, TxOut}; use bitcoin::hash_types::BlockHash; +use bitcoin::transaction::{OutPoint, TxOut}; use lightning::ln::peer_handler::APeerManager; diff --git a/lightning-block-sync/src/test_utils.rs b/lightning-block-sync/src/test_utils.rs index 960c72ad3..bf507a14d 100644 --- a/lightning-block-sync/src/test_utils.rs +++ b/lightning-block-sync/src/test_utils.rs @@ -6,8 +6,8 @@ use crate::{ use bitcoin::block::{Block, Header, Version}; use bitcoin::constants::genesis_block; -use bitcoin::locktime::absolute::LockTime; use bitcoin::hash_types::{BlockHash, TxMerkleNode}; +use bitcoin::locktime::absolute::LockTime; use bitcoin::network::Network; use bitcoin::transaction; use bitcoin::Transaction; diff --git a/lightning/src/ln/interactivetxs.rs b/lightning/src/ln/interactivetxs.rs index 6bb558222..4e358ec72 100644 --- a/lightning/src/ln/interactivetxs.rs +++ b/lightning/src/ln/interactivetxs.rs @@ -12,8 +12,8 @@ use crate::prelude::*; use bitcoin::absolute::LockTime as AbsoluteLockTime; use bitcoin::amount::Amount; -use bitcoin::constants::WITNESS_SCALE_FACTOR; use bitcoin::consensus::Encodable; +use bitcoin::constants::WITNESS_SCALE_FACTOR; use bitcoin::policy::MAX_STANDARD_TX_WEIGHT; use bitcoin::transaction::Version; use bitcoin::{OutPoint, ScriptBuf, Sequence, Transaction, TxIn, TxOut, Weight}; @@ -1304,10 +1304,10 @@ mod tests { use crate::util::ser::TransactionU16LenLimited; use bitcoin::absolute::LockTime as AbsoluteLockTime; use bitcoin::amount::Amount; - use bitcoin::opcodes; - use bitcoin::script::Builder; use bitcoin::hashes::Hash; use bitcoin::key::UntweakedPublicKey; + use bitcoin::opcodes; + use bitcoin::script::Builder; use bitcoin::secp256k1::{Keypair, Secp256k1}; use bitcoin::transaction::Version; use bitcoin::{ diff --git a/lightning/src/sign/mod.rs b/lightning/src/sign/mod.rs index 99c328d60..2e6e69cc0 100644 --- a/lightning/src/sign/mod.rs +++ b/lightning/src/sign/mod.rs @@ -14,15 +14,15 @@ use bitcoin::amount::Amount; use bitcoin::bip32::{ChildNumber, Xpriv, Xpub}; +use bitcoin::ecdsa::Signature as EcdsaSignature; use bitcoin::locktime::absolute::LockTime; +use bitcoin::network::Network; use bitcoin::opcodes; use bitcoin::script::{Builder, Script, ScriptBuf}; -use bitcoin::transaction::{Transaction, TxIn, TxOut}; -use bitcoin::ecdsa::Signature as EcdsaSignature; -use bitcoin::network::Network; use bitcoin::sighash; use bitcoin::sighash::EcdsaSighashType; use bitcoin::transaction::Version; +use bitcoin::transaction::{Transaction, TxIn, TxOut}; use bech32::u5; use bitcoin::hashes::sha256::Hash as Sha256; diff --git a/lightning/src/sign/taproot.rs b/lightning/src/sign/taproot.rs index 95f417514..740942bc0 100644 --- a/lightning/src/sign/taproot.rs +++ b/lightning/src/sign/taproot.rs @@ -1,9 +1,9 @@ //! Defines a Taproot-specific signer type. use alloc::vec::Vec; -use bitcoin::transaction::Transaction; use bitcoin::secp256k1; use bitcoin::secp256k1::{schnorr::Signature, PublicKey, Secp256k1, SecretKey}; +use bitcoin::transaction::Transaction; use musig2::types::{PartialSignature, PublicNonce}; -- 2.39.5