Skip to content

Commit

Permalink
Merge branch 'dev' into feature/clear-ocw-validation-activities
Browse files Browse the repository at this point in the history
  • Loading branch information
khssnv committed Nov 26, 2024
2 parents defa733 + 97d08d4 commit 57acdfd
Show file tree
Hide file tree
Showing 9 changed files with 499 additions and 583 deletions.
4 changes: 2 additions & 2 deletions pallets/ddc-clusters/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ fn set_last_validated_era_works() {

// Cluster doesn't exist
assert_noop!(
DdcClusters::set_last_paid_era(&cluster_id, era_id),
<DdcClusters as ClusterValidator<Test>>::set_last_paid_era(&cluster_id, era_id),
Error::<Test>::ClusterDoesNotExist
);

Expand Down Expand Up @@ -619,7 +619,7 @@ fn set_last_validated_era_works() {
}
));

assert_ok!(DdcClusters::set_last_paid_era(&cluster_id, era_id));
assert_ok!(<DdcClusters as ClusterValidator<Test>>::set_last_paid_era(&cluster_id, era_id));

let updated_cluster = DdcClusters::clusters(cluster_id).unwrap();
assert_eq!(updated_cluster.last_paid_era, era_id);
Expand Down
9 changes: 3 additions & 6 deletions pallets/ddc-payouts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,15 @@ mod tests;

pub mod migrations;

#[cfg(feature = "runtime-benchmarks")]
use ddc_primitives::BillingReportParams;
use ddc_primitives::{
traits::{
bucket::BucketManager, cluster::ClusterProtocol as ClusterProtocolType,
customer::CustomerCharger as CustomerChargerType, node::NodeManager,
pallet::PalletVisitor as PalletVisitorType, payout::PayoutProcessor,
},
BatchIndex, BucketId, BucketUsage, ClusterId, CustomerCharge, DdcEra, MMRProof, NodePubKey,
NodeUsage, PayoutError, PayoutState, ProviderReward, MAX_PAYOUT_BATCH_COUNT,
MAX_PAYOUT_BATCH_SIZE, MILLICENTS,
BatchIndex, BillingReportParams, BucketId, BucketUsage, ClusterId, CustomerCharge, DdcEra,
MMRProof, NodePubKey, NodeUsage, PayoutError, PayoutState, ProviderReward,
MAX_PAYOUT_BATCH_COUNT, MAX_PAYOUT_BATCH_SIZE, MILLICENTS,
};
use frame_election_provider_support::SortedListProvider;
use frame_support::{
Expand Down Expand Up @@ -1160,7 +1158,6 @@ pub mod pallet {
Ok(None)
}

#[cfg(feature = "runtime-benchmarks")]
fn create_billing_report(vault: T::AccountId, params: BillingReportParams) {
let mut charging_processed_batches =
BoundedBTreeSet::<BatchIndex, MaxBatchesCount>::new();
Expand Down
Loading

0 comments on commit 57acdfd

Please sign in to comment.