From 127771ba382a25bab26131000e56272d7137a137 Mon Sep 17 00:00:00 2001 From: Zeke Mostov <32168567+emostov@users.noreply.github.com> Date: Thu, 3 Jun 2021 21:01:30 -0700 Subject: [PATCH] Cleanup unused errors & events in lease coordination pallets (#3174) * Cleanup unused errors & events in lease cordination modules * Spelling --- polkadot/runtime/common/src/auctions.rs | 23 ------------------- polkadot/runtime/common/src/crowdloan.rs | 8 ------- .../runtime/common/src/paras_registrar.rs | 2 -- polkadot/runtime/common/src/slots.rs | 7 +++--- 4 files changed, 4 insertions(+), 36 deletions(-) diff --git a/polkadot/runtime/common/src/auctions.rs b/polkadot/runtime/common/src/auctions.rs index 994ac8f4fc..f09fad95ee 100644 --- a/polkadot/runtime/common/src/auctions.rs +++ b/polkadot/runtime/common/src/auctions.rs @@ -118,13 +118,6 @@ pub mod pallet { AuctionStarted(AuctionIndex, LeasePeriodOf, T::BlockNumber), /// An auction ended. All funds become unreserved. [auction_index] AuctionClosed(AuctionIndex), - /// Someone won the right to deploy a parachain. Balance amount is deducted for deposit. - /// [bidder, range, parachain_id, amount] - WonDeploy(T::AccountId, SlotRange, ParaId, BalanceOf), - /// An existing parachain won the right to continue. - /// First balance is the extra amount reserved. Second is the total amount reserved. - /// [parachain_id, begin, count, total_amount] - WonRenewal(ParaId, LeasePeriodOf, LeasePeriodOf, BalanceOf), /// Funds were reserved for a winning bid. First balance is the extra amount reserved. /// Second is the total. [bidder, extra_reserved, total_amount] Reserved(T::AccountId, BalanceOf, BalanceOf), @@ -148,28 +141,12 @@ pub mod pallet { AuctionInProgress, /// The lease period is in the past. LeasePeriodInPast, - /// The origin for this call must be a parachain. - NotParaOrigin, /// Para is not registered ParaNotRegistered, - /// The parachain ID is not on-boarding. - ParaNotOnboarding, - /// The origin for this call must be the origin who registered the parachain. - InvalidOrigin, - /// Parachain is already registered. - AlreadyRegistered, - /// The code must correspond to the hash. - InvalidCode, - /// Deployment data has not been set for this parachain. - UnsetDeployData, /// Not a current auction. NotCurrentAuction, /// Not an auction. NotAuction, - /// Given code size is too large. - CodeTooLarge, - /// Given initial head data is too large. - HeadDataTooLarge, /// Auction has already ended. AuctionEnded, } diff --git a/polkadot/runtime/common/src/crowdloan.rs b/polkadot/runtime/common/src/crowdloan.rs index 4d0a73d136..8b5cc5c54f 100644 --- a/polkadot/runtime/common/src/crowdloan.rs +++ b/polkadot/runtime/common/src/crowdloan.rs @@ -236,10 +236,6 @@ pub mod pallet { AllRefunded(ParaId), /// Fund is dissolved. [fund_index] Dissolved(ParaId), - /// The deploy data of the funded parachain is set. [fund_index] - DeployDataFixed(ParaId), - /// On-boarding process for a winning parachain fund is completed. [find_index, parachain_id] - Onboarded(ParaId, ParaId), /// The result of trying to submit a new bid to the Slots pallet. HandleBidResult(ParaId, DispatchResult), /// The configuration to a crowdloan has been edited. [fund_index] @@ -282,14 +278,10 @@ pub mod pallet { LeaseActive, /// This parachain's bid or lease is still active and withdraw cannot yet begin. BidOrLeaseActive, - /// Funds have not yet been returned. - FundsNotReturned, /// The crowdloan has not yet ended. FundNotEnded, /// There are no contributions stored in this crowdloan. NoContributions, - /// This crowdloan has an active parachain and cannot be dissolved. - HasActiveParachain, /// The crowdloan is not ready to dissolve. Potentially still has a slot or in retirement period. NotReadyToDissolve, /// Invalid signature. diff --git a/polkadot/runtime/common/src/paras_registrar.rs b/polkadot/runtime/common/src/paras_registrar.rs index 131bd05248..4e9219b6ed 100644 --- a/polkadot/runtime/common/src/paras_registrar.rs +++ b/polkadot/runtime/common/src/paras_registrar.rs @@ -155,8 +155,6 @@ pub mod pallet { CannotUpgrade, /// Para is locked from manipulation by the manager. Must use parachain or relay chain governance. ParaLocked, - /// The id you are trying to register is reserved for system parachains. - InvalidParaId, /// The ID given for registration has not been reserved. NotReserved, } diff --git a/polkadot/runtime/common/src/slots.rs b/polkadot/runtime/common/src/slots.rs index af16765353..b1787fdf45 100644 --- a/polkadot/runtime/common/src/slots.rs +++ b/polkadot/runtime/common/src/slots.rs @@ -99,9 +99,10 @@ decl_event!( { /// A new [lease_period] is beginning. NewLeasePeriod(LeasePeriod), - /// An existing parachain won the right to continue. - /// First balance is the extra amount reseved. Second is the total amount reserved. - /// \[parachain_id, leaser, period_begin, period_count, extra_reseved, total_amount\] + /// A para has won the right to a continuous set of lease periods as a parachain. + /// First balance is any extra amount reserved on top of the para's existing deposit. + /// Second balance is the total amount reserved. + /// \[parachain_id, leaser, period_begin, period_count, extra_reserved, total_amount\] Leased(ParaId, AccountId, LeasePeriod, LeasePeriod, Balance, Balance), } );