Skip to content

Commit 9012cf7

Browse files
committed
chore: cargo fmt-stacks
1 parent 5801992 commit 9012cf7

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

stackslib/src/core/mempool.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ use std::hash::Hasher;
2020
use std::io::{Read, Write};
2121
use std::ops::{Deref, DerefMut};
2222
use std::path::{Path, PathBuf};
23+
use std::str::FromStr;
2324
use std::time::Instant;
2425
use std::{fs, io};
25-
use std::str::FromStr;
2626

2727
use clarity::vm::types::PrincipalData;
2828
use rand::distributions::Uniform;

stackslib/src/core/tests/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ use crate::chainstate::stacks::{
5858
C32_ADDRESS_VERSION_TESTNET_SINGLESIG,
5959
};
6060
use crate::core::mempool::{
61-
db_get_all_nonces, MemPoolSyncData, MemPoolWalkSettings, MemPoolWalkTxTypes, TxTag, BLOOM_COUNTER_DEPTH,
62-
BLOOM_COUNTER_ERROR_RATE, MAX_BLOOM_COUNTER_TXS,
61+
db_get_all_nonces, MemPoolSyncData, MemPoolWalkSettings, MemPoolWalkTxTypes, TxTag,
62+
BLOOM_COUNTER_DEPTH, BLOOM_COUNTER_ERROR_RATE, MAX_BLOOM_COUNTER_TXS,
6363
};
6464
use crate::core::{FIRST_BURNCHAIN_CONSENSUS_HASH, FIRST_STACKS_BLOCK_HASH};
6565
use crate::net::Error as NetError;

stackslib/src/cost_estimates/fee_scalar.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use std::iter::FromIterator;
44
use std::path::Path;
55

66
use clarity::vm::costs::ExecutionCost;
7+
use clarity::vm::database::{ClaritySerializable, STXBalance};
78
use rusqlite::types::{FromSql, FromSqlError};
89
use rusqlite::{
910
Connection, Error as SqliteError, OptionalExtension, ToSql, Transaction as SqlTransaction,
@@ -12,10 +13,6 @@ use serde_json::Value as JsonValue;
1213

1314
use super::metrics::CostMetric;
1415
use super::{EstimatorError, FeeEstimator, FeeRateEstimate};
15-
16-
use clarity::vm::database::ClaritySerializable;
17-
use clarity::vm::database::STXBalance;
18-
1916
use crate::chainstate::stacks::db::StacksEpochReceipt;
2017
use crate::chainstate::stacks::events::TransactionOrigin;
2118
use crate::chainstate::stacks::TransactionPayload;

stackslib/src/net/httpcore.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ use stacks_common::types::chainstate::{
3232
use stacks_common::types::net::PeerHost;
3333
use stacks_common::types::Address;
3434
use stacks_common::util::chunked_encoding::*;
35-
use stacks_common::util::retry::{BoundReader, RetryReader};
3635
use stacks_common::util::get_epoch_time_ms;
36+
use stacks_common::util::retry::{BoundReader, RetryReader};
3737
use url::Url;
3838

3939
use crate::burnchains::Txid;
@@ -436,12 +436,16 @@ pub trait RPCRequestHandler: HttpRequest + HttpResponse + RPCRequestHandlerClone
436436
pub struct StacksHttpRequest {
437437
preamble: HttpRequestPreamble,
438438
contents: HttpRequestContents,
439-
start_time: u128
439+
start_time: u128,
440440
}
441441

442442
impl StacksHttpRequest {
443443
pub fn new(preamble: HttpRequestPreamble, contents: HttpRequestContents) -> Self {
444-
Self { preamble, contents, start_time: get_epoch_time_ms() }
444+
Self {
445+
preamble,
446+
contents,
447+
start_time: get_epoch_time_ms(),
448+
}
445449
}
446450

447451
/// Instantiate a request to a remote Stacks peer
@@ -472,7 +476,11 @@ impl StacksHttpRequest {
472476
preamble.path_and_query_str = decoded_path;
473477
}
474478

475-
Ok(Self { preamble, contents, start_time: get_epoch_time_ms() })
479+
Ok(Self {
480+
preamble,
481+
contents,
482+
start_time: get_epoch_time_ms(),
483+
})
476484
}
477485

478486
/// Get a reference to the request premable metadata

0 commit comments

Comments
 (0)