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
@@ -1146,7 +1146,7 @@ impl<T: Trait + Send + Sync> SignedExtension for CheckEra<T> {
fn additional_signed(&self) -> Result<Self::AdditionalSigned, TransactionValidityError> {
let current_u64 = <Module<T>>::block_number().saturated_into::<u64>();
let n = (self.0).0.birth(current_u64).saturated_into::<T::BlockNumber>();
if !<BlockHash<T>>::exists(n) {
if !<BlockHash<T>>::contains_key(n) {
Err(InvalidTransaction::AncientBirthBlock.into())
} else {
Ok(<Module<T>>::block_hash(n))