Questions tagged [remove-all]
The remove-all tag has no usage guidance.
4 questions
0
votes
1
answer
16
views
How to clean a double storage map using primary key?
I have a double storage map.
pub type Schools<T: Config> = StorageDoubleMap<
_,
Blake2_128Concat,
SchoolId,
Blake2_128Concat,
StudentId,
...
0
votes
1
answer
71
views
how to remove Mapping storage when tuple is used as input
Lets assume we have an ink! smart contract
On a vanilla Mapping
alpha: Mapping<[u8;32], Astruct>
we can use
self.alpha.remove(&somehash)
My question is this:
if we have the following ...
1
vote
1
answer
149
views
When to use StorageDoubleMap `clear_prefix` vs `drain_prefix`?
Hey Substrate community,
there are two different methods to remove multiple items for one specific first key from a StorageDoubleMap. There is clear_prefix and drain_prefix. clear_prefix provides ...
12
votes
1
answer
74
views
Multiple remove_all calls in same block
I stumbled upon an unexpected behavior when doing storage migration.
Problem Description
I want to clean-up a large DoubleStorageMap in multiple steps.
And that works just fine, however I also want to ...