mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 19:01:08 +00:00
Crowdloan Updates (#2166)
* Rename crowdfund -> crowdloan
* allow contribution on behalf of another user
* starting some benchmarks
* optimization: use append api
* Use on_initialize instead of on_finalize
* More benchmarks
* try to implement partial child storage removal
* partial dissolve test
* onboard benchmark
* begin retirement
* on_initialize
* remove _ { }
* Revert "allow contribution on behalf of another user"
This reverts commit b7dd7d1ec751495cee3ddb57133a13c390b020e5.
* finish undo of "allow contribution on behalf of another user"
* Allow any user to trigger withdraw on closed crowdloan
* use transfer instead of withdraw/create pattern
* unused warning
* Update runtime/common/src/crowdloan.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* dont need to assign to empty variable
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
+573
-226
File diff suppressed because it is too large
Load Diff
@@ -21,7 +21,7 @@
|
||||
pub mod claims;
|
||||
pub mod slot_range;
|
||||
pub mod slots;
|
||||
pub mod crowdfund;
|
||||
pub mod crowdloan;
|
||||
pub mod purchase;
|
||||
pub mod impls;
|
||||
pub mod paras_sudo_wrapper;
|
||||
|
||||
@@ -579,9 +579,9 @@ impl<T: Config> Module<T> {
|
||||
/// ending. An immediately subsequent call with the same argument will always return `None`.
|
||||
fn check_auction_end(now: T::BlockNumber) -> Option<(WinningData<T>, LeasePeriodOf<T>)> {
|
||||
if let Some((lease_period_index, early_end)) = <AuctionInfo<T>>::get() {
|
||||
if early_end + T::EndingPeriod::get() == now {
|
||||
let ending_period = T::EndingPeriod::get();
|
||||
if early_end + ending_period == now {
|
||||
// Just ended!
|
||||
let ending_period = T::EndingPeriod::get();
|
||||
let offset = T::BlockNumber::decode(&mut T::Randomness::random_seed().as_ref())
|
||||
.expect("secure hashes always bigger than block numbers; qed") % ending_period;
|
||||
let res = <Winning<T>>::get(offset).unwrap_or_default();
|
||||
|
||||
Reference in New Issue
Block a user