Closed dvcpull closed 2 weeks ago
Lets say we have a StorageMap like this
#[pallet::storage] pub type ItemsToProcess<T: Config<I>, I: 'static = ()> = StorageMap< _, Blake2_128Concat, BlockNumberFor<T>, BoundedVec<u32, T::MaxItemsToProcess>, ValueQuery, >;
Lets say we insert a key and remove it later like this
ItemsToProcess::<T>::insert(1, vec![].try_into().unwrap()); ... ItemsToProcess::<T>::remove(1);
When running test, this test fails (even after the removal of key, the contains key returns true)
assert!(!ItemsToProcess::<T>::contains_key(1))
This is inconsistent with searching for a random key, like this where it returns false correctly
assert!(ItemsToProcess::<T>::contains_key(123))
No response
Why was it closed?
misunderstanding, not a bug
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Description of bug
Lets say we have a StorageMap like this
Lets say we insert a key and remove it later like this
When running test, this test fails (even after the removal of key, the contains key returns true)
This is inconsistent with searching for a random key, like this where it returns false correctly
Steps to reproduce
No response