Rename StorageMap::exists to ::contains_key (Resolves #4839) (#4847)

* rename StorageMap::exists(key) to ::contains_key(key)

* bump impl_version
This commit is contained in:
Alexander Popiak
2020-02-08 20:31:35 +01:00
committed by GitHub
parent 503bfc9da9
commit cb567d6b8b
26 changed files with 100 additions and 100 deletions
+1 -1
View File
@@ -265,7 +265,7 @@ decl_module! {
/// the index of the transactor in the `Pool`.
pub fn submit_candidacy(origin) {
let who = ensure_signed(origin)?;
ensure!(!<CandidateExists<T, I>>::exists(&who), Error::<T, I>::AlreadyInPool);
ensure!(!<CandidateExists<T, I>>::contains_key(&who), Error::<T, I>::AlreadyInPool);
let deposit = T::CandidateDeposit::get();
T::Currency::reserve(&who, deposit)?;