chore: regenerate umbrella crate, fix feature propagation
This commit is contained in:
@@ -42,7 +42,11 @@ fn fill_queues<T: Config>() -> Result<(), DispatchError> {
|
||||
Pezpallet::<T>::place_bid(RawOrigin::Signed(caller.clone()).into(), T::MinBid::get(), 1)?;
|
||||
}
|
||||
for d in 1..queues {
|
||||
Pezpallet::<T>::place_bid(RawOrigin::Signed(caller.clone()).into(), T::MinBid::get(), 1 + d)?;
|
||||
Pezpallet::<T>::place_bid(
|
||||
RawOrigin::Signed(caller.clone()).into(),
|
||||
T::MinBid::get(),
|
||||
1 + d,
|
||||
)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
@@ -58,7 +62,11 @@ mod benchmarks {
|
||||
let bid = T::MinBid::get();
|
||||
T::Currency::set_balance(&caller, (ed + bid) * BalanceOf::<T>::from(l + 1) + bid);
|
||||
for _ in 0..l {
|
||||
Pezpallet::<T>::place_bid(RawOrigin::Signed(caller.clone()).into(), T::MinBid::get(), 1)?;
|
||||
Pezpallet::<T>::place_bid(
|
||||
RawOrigin::Signed(caller.clone()).into(),
|
||||
T::MinBid::get(),
|
||||
1,
|
||||
)?;
|
||||
}
|
||||
|
||||
#[extrinsic_call]
|
||||
@@ -81,7 +89,11 @@ mod benchmarks {
|
||||
let ql = T::MaxQueueLen::get();
|
||||
T::Currency::set_balance(&caller, (ed + bid) * BalanceOf::<T>::from(ql + 1) + bid);
|
||||
for _ in 0..T::MaxQueueLen::get() {
|
||||
Pezpallet::<T>::place_bid(RawOrigin::Signed(caller.clone()).into(), T::MinBid::get(), 1)?;
|
||||
Pezpallet::<T>::place_bid(
|
||||
RawOrigin::Signed(caller.clone()).into(),
|
||||
T::MinBid::get(),
|
||||
1,
|
||||
)?;
|
||||
}
|
||||
|
||||
#[extrinsic_call]
|
||||
@@ -105,7 +117,11 @@ mod benchmarks {
|
||||
let bid = T::MinBid::get();
|
||||
T::Currency::set_balance(&caller, (ed + bid) * BalanceOf::<T>::from(l + 1) + bid);
|
||||
for _ in 0..l {
|
||||
Pezpallet::<T>::place_bid(RawOrigin::Signed(caller.clone()).into(), T::MinBid::get(), 1)?;
|
||||
Pezpallet::<T>::place_bid(
|
||||
RawOrigin::Signed(caller.clone()).into(),
|
||||
T::MinBid::get(),
|
||||
1,
|
||||
)?;
|
||||
}
|
||||
|
||||
#[extrinsic_call]
|
||||
@@ -138,9 +154,11 @@ mod benchmarks {
|
||||
_(origin as T::RuntimeOrigin);
|
||||
|
||||
// Must fund at least 99.999% of the required amount.
|
||||
let missing =
|
||||
Perquintill::from_rational(T::Currency::balance(&Pezpallet::<T>::account_id()), original)
|
||||
.left_from_one();
|
||||
let missing = Perquintill::from_rational(
|
||||
T::Currency::balance(&Pezpallet::<T>::account_id()),
|
||||
original,
|
||||
)
|
||||
.left_from_one();
|
||||
assert!(missing <= Perquintill::one() / 100_000);
|
||||
|
||||
Ok(())
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
//! funds are unreserved.
|
||||
//!
|
||||
//! There's a target proportion of effective total issuance (i.e. accounting for existing receipts)
|
||||
//! which the pezpallet attempts to have frozen at any one time. It will likely be gradually increased
|
||||
//! over time by governance.
|
||||
//! which the pezpallet attempts to have frozen at any one time. It will likely be gradually
|
||||
//! increased over time by governance.
|
||||
//!
|
||||
//! As the proportion of effective total issuance represented by outstanding receipts drops below
|
||||
//! `FrozenFraction`, then bids are taken from queues and consolidated into receipts, with the queue
|
||||
@@ -195,7 +195,8 @@ pub mod pezpallet {
|
||||
|
||||
/// Overarching event type.
|
||||
#[allow(deprecated)]
|
||||
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
|
||||
type RuntimeEvent: From<Event<Self>>
|
||||
+ IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
|
||||
|
||||
/// The treasury's pezpallet id, used for deriving its sovereign account ID.
|
||||
#[pezpallet::constant]
|
||||
@@ -917,8 +918,9 @@ pub mod pezpallet {
|
||||
/// The effective total issuance, hypothetically if all outstanding receipts were thawed at
|
||||
/// present.
|
||||
pub effective: Balance,
|
||||
/// The amount needed to be accessible to this pezpallet in case all outstanding receipts were
|
||||
/// thawed at present. If it is more than `holdings`, then the pezpallet will need funding.
|
||||
/// The amount needed to be accessible to this pezpallet in case all outstanding receipts
|
||||
/// were thawed at present. If it is more than `holdings`, then the pezpallet will need
|
||||
/// funding.
|
||||
pub required: Balance,
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,8 @@ impl pezpallet_nis::Config for Test {
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type PalletId = NisPalletId;
|
||||
type Currency = Balances;
|
||||
type CurrencyBalance = <Self as pezpallet_balances::Config<pezpallet_balances::Instance1>>::Balance;
|
||||
type CurrencyBalance =
|
||||
<Self as pezpallet_balances::Config<pezpallet_balances::Instance1>>::Balance;
|
||||
type FundOrigin = pezframe_system::EnsureSigned<Self::AccountId>;
|
||||
type Deficit = ();
|
||||
type IgnoredIssuance = IgnoredIssuance;
|
||||
@@ -150,5 +151,8 @@ pub fn new_test_ext() -> pezsp_io::TestExternalities {
|
||||
// our desired mockup, but without any balances.
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
pub fn new_test_ext_empty() -> pezsp_io::TestExternalities {
|
||||
pezframe_system::GenesisConfig::<Test>::default().build_storage().unwrap().into()
|
||||
pezframe_system::GenesisConfig::<Test>::default()
|
||||
.build_storage()
|
||||
.unwrap()
|
||||
.into()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user