Skip to content

Commit

Permalink
clippy + fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ogabrielides committed Jul 4, 2024
1 parent 199cfb7 commit 33ab299
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,10 @@ mod tests {
use crate::execution::types::block_state_info::v0::BlockStateInfoV0;
use crate::platform_types::epoch_info::v0::EpochInfoV0;
use crate::platform_types::epoch_info::EpochInfo;
use crate::platform_types::platform_state::v0::PlatformStateV0Methods;
use crate::platform_types::platform_state::PlatformState;
use dpp::fee::epoch::{perpetual_storage_epochs, CreditsPerEpoch, GENESIS_EPOCH_INDEX};
use drive::drive::defaults::INITIAL_PROTOCOL_VERSION;
use crate::platform_types::platform_state::v0::PlatformStateV0Methods;

/// Process and validate block fees
pub fn process_and_validate_block_fees<C>(
Expand Down Expand Up @@ -302,7 +302,9 @@ mod tests {
};

let block_execution_context_clone = block_execution_context.clone();
let previous_fee_versions = block_execution_context_clone.block_platform_state().previous_fee_versions();
let previous_fee_versions = block_execution_context_clone
.block_platform_state()
.previous_fee_versions();
let storage_fee_distribution_outcome = platform
.process_block_fees_v0(
&block_execution_context.into(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::drive::batch::drive_op_batch::finalize_task::{
};
use crate::error::drive::DriveError;
use dpp::data_contract::accessors::v0::DataContractV0Getters;
use dpp::prelude::CachedEpochIndexFeeVersions;

use dpp::version::PlatformVersion;
use grovedb::batch::KeyInfoPath;
use grovedb::{EstimatedLayerInformation, TransactionArg};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use dpp::data_contract::accessors::v0::DataContractV0Getters;
use dpp::data_contract::document_type::DocumentTypeRef;
use dpp::data_contract::DataContract;
use dpp::document::Document;
use dpp::prelude::{CachedEpochIndexFeeVersions, Identifier};
use dpp::prelude::Identifier;

use dpp::system_data_contracts::withdrawals_contract::v1::document_types::withdrawal;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use dpp::block::block_info::BlockInfo;

use dpp::version::PlatformVersion;

use dpp::prelude::CachedEpochIndexFeeVersions;
use grovedb::TransactionArg;

impl Drive {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use crate::error::Error;
use crate::fee::op::LowLevelDriveOperation;
use dpp::block::block_info::BlockInfo;

use dpp::prelude::CachedEpochIndexFeeVersions;
use dpp::version::PlatformVersion;
use grovedb::batch::GroveDbOp;
use grovedb::TransactionArg;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::error::Error;
use crate::fee::op::LowLevelDriveOperation;
use dpp::block::block_info::BlockInfo;
use dpp::identity::{Identity, IdentityPublicKey, KeyID};
use dpp::prelude::{CachedEpochIndexFeeVersions, IdentityNonce, Revision};
use dpp::prelude::{IdentityNonce, Revision};

use crate::drive::identity::update::methods::merge_identity_nonce::MergeIdentityContractNonceResultToResult;
use dpp::version::PlatformVersion;
Expand Down
2 changes: 1 addition & 1 deletion packages/rs-drive/src/drive/batch/drive_op_batch/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use crate::drive::batch::drive_op_batch::finalize_task::{
DriveOperationFinalizationTasks, DriveOperationFinalizeTask,
};
use crate::error::drive::DriveError;
use dpp::prelude::CachedEpochIndexFeeVersions;

use std::collections::{BTreeMap, HashMap};

/// A converter that will get Drive Operations from High Level Operations
Expand Down
2 changes: 1 addition & 1 deletion packages/rs-drive/src/drive/batch/drive_op_batch/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use dpp::fee::Credits;
use dpp::platform_value::Bytes36;

use dpp::asset_lock::reduced_asset_lock_value::AssetLockValue;
use dpp::prelude::CachedEpochIndexFeeVersions;

use dpp::version::PlatformVersion;
use grovedb::batch::KeyInfoPath;
use grovedb::{EstimatedLayerInformation, TransactionArg};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::drive::identity::withdrawals::{
use crate::drive::object_size_info::PathKeyElementInfo;
use crate::{drive::Drive, error::Error, fee::op::LowLevelDriveOperation};
use dpp::block::block_info::BlockInfo;
use dpp::prelude::CachedEpochIndexFeeVersions;

use dpp::version::PlatformVersion;
use grovedb::Element;
use grovedb::{batch::KeyInfoPath, EstimatedLayerInformation, TransactionArg};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ pub struct FeeHashingVersion {
pub sha256_per_block: u64,
pub sha256_ripe_md160_base: u64,
pub single_sha256_base: u64,

}
impl PartialEq for FeeHashingVersion {
fn eq(&self, other: &Self) -> bool {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ mod tests {
// This assertion will check if all fields are considered in the equality comparison
assert_eq!(version1, version2, "FeeSignatureVersion equality test failed. If a field was added or removed, update the Eq implementation.");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ mod tests {
// This assertion will check if all fields are considered in the equality comparison
assert_eq!(version1, version2, "FeeStorageVersion equality test failed. If a field was added or removed, update the Eq implementation.");
}
}
}

0 comments on commit 33ab299

Please sign in to comment.