mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-12 21:35:48 +00:00
Add Many Sanity Checks to Crowdloans (#2745)
* Add many sanity checks to Crowdloans * fix tests * test contribution block in integration test * fix rococo build * remove leaser from crowdloans * fix docs and terms * fix compile
This commit is contained in:
@@ -54,7 +54,7 @@ pub trait Config: frame_system::Config {
|
||||
/// The overarching event type.
|
||||
type Event: From<Event<Self>> + Into<<Self as frame_system::Config>::Event>;
|
||||
|
||||
/// The number of blocks over which a single period lasts.
|
||||
/// The type representing the leasing system.
|
||||
type Leaser: Leaser<AccountId=Self::AccountId, LeasePeriod=Self::BlockNumber>;
|
||||
|
||||
/// The parachain registrar type.
|
||||
@@ -332,6 +332,14 @@ impl<T: Config> Auctioneer for Module<T> {
|
||||
fn lease_period_index() -> Self::LeasePeriod {
|
||||
T::Leaser::lease_period_index()
|
||||
}
|
||||
|
||||
fn lease_period() -> Self::LeasePeriod {
|
||||
T::Leaser::lease_period()
|
||||
}
|
||||
|
||||
fn has_won_an_auction(para: ParaId, bidder: &T::AccountId) -> bool {
|
||||
!T::Leaser::deposit_held(para, bidder).is_zero()
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Config> Module<T> {
|
||||
|
||||
Reference in New Issue
Block a user