Skip to content

Commit

Permalink
new-benches-3
Browse files Browse the repository at this point in the history
  • Loading branch information
lrazovic authored and JuaniRios committed May 29, 2024
1 parent fad7274 commit a536f8d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions pallets/funding/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -411,11 +411,11 @@ impl Config for TestRuntime {
type FundingCurrency = ForeignAssets;
type InvestorOrigin = EnsureInvestor<TestRuntime>;
type ManualAcceptanceDuration = ManualAcceptanceDuration;
type MaxBidsPerProject = ConstU32<1024>;
type MaxBidsPerProject = ConstU32<512>;
type MaxBidsPerUser = ConstU32<25>;
type MaxCapacityThresholds = MaxCapacityThresholds;
type MaxContributionsPerUser = ConstU32<25>;
type MaxEvaluationsPerProject = ConstU32<1024>;
type MaxEvaluationsPerProject = ConstU32<512>;
type MaxEvaluationsPerUser = ConstU32<4>;
type MaxMessageSizeThresholds = MaxMessageSizeThresholds;
type MaxProjectsToUpdateInsertionAttempts = ConstU32<100>;
Expand Down
6 changes: 3 additions & 3 deletions pallets/funding/src/tests/3_auction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -677,10 +677,10 @@ mod round_flow {
let mut inst = MockInstantiator::new(Some(RefCell::new(new_test_ext())));
let total_allocation = 10_000_000 * CT_UNIT;
let min_bid_ct = 500 * CT_UNIT; // 5k USD at 10USD/CT

let max_bids_per_project: u32 = <TestRuntime as Config>::MaxBidsPerProject::get();
let big_bid: BidParams<TestRuntime> = (BIDDER_1, total_allocation).into();
let small_bids: Vec<BidParams<TestRuntime>> =
(0..1023u32).map(|i| (i + BIDDER_1, min_bid_ct).into()).collect();
(0..max_bids_per_project-1).map(|i| (i + BIDDER_1, min_bid_ct).into()).collect();
let all_bids = vec![vec![big_bid.clone()], small_bids.clone()].into_iter().flatten().collect_vec();

let mut project_metadata = default_project_metadata(ISSUER_1);
Expand All @@ -700,7 +700,7 @@ mod round_flow {
let all_bids = inst.execute(|| Bids::<TestRuntime>::iter_prefix_values((project_id,)).collect_vec());

let higher_than_wap_bids = all_bids.iter().filter(|bid| bid.original_ct_usd_price > wap).collect_vec();
assert_eq!(higher_than_wap_bids.len(), 1023);
assert_eq!(higher_than_wap_bids.len(), (max_bids_per_project-1u32) as usize);
}
}

Expand Down
4 changes: 2 additions & 2 deletions runtimes/polimec/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1043,11 +1043,11 @@ impl pallet_funding::Config for Runtime {
type FundingCurrency = ForeignAssets;
type InvestorOrigin = EnsureInvestor<Runtime>;
type ManualAcceptanceDuration = ManualAcceptanceDuration;
type MaxBidsPerProject = ConstU32<1024>;
type MaxBidsPerProject = ConstU32<512>;
type MaxBidsPerUser = ConstU32<16>;
type MaxCapacityThresholds = MaxCapacityThresholds;
type MaxContributionsPerUser = ConstU32<16>;
type MaxEvaluationsPerProject = ConstU32<1024>;
type MaxEvaluationsPerProject = ConstU32<512>;
type MaxEvaluationsPerUser = ConstU32<16>;
type MaxMessageSizeThresholds = MaxMessageSizeThresholds;
type MaxProjectsToUpdateInsertionAttempts = ConstU32<100>;
Expand Down
4 changes: 2 additions & 2 deletions runtimes/politest/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1036,11 +1036,11 @@ impl pallet_funding::Config for Runtime {
type FundingCurrency = ForeignAssets;
type InvestorOrigin = EnsureInvestor<Runtime>;
type ManualAcceptanceDuration = ManualAcceptanceDuration;
type MaxBidsPerProject = ConstU32<1024>;
type MaxBidsPerProject = ConstU32<512>;
type MaxBidsPerUser = ConstU32<16>;
type MaxCapacityThresholds = MaxCapacityThresholds;
type MaxContributionsPerUser = ConstU32<16>;
type MaxEvaluationsPerProject = ConstU32<1024>;
type MaxEvaluationsPerProject = ConstU32<512>;
type MaxEvaluationsPerUser = ConstU32<16>;
type MaxMessageSizeThresholds = MaxMessageSizeThresholds;
type MaxProjectsToUpdateInsertionAttempts = ConstU32<100>;
Expand Down

0 comments on commit a536f8d

Please sign in to comment.