Skip to content
Commit 9bf62ef6 authored by thiolliere's avatar thiolliere Committed by GitHub
Browse files

Allow to specify some max number of values for storages in pallet macro. (#8735)



* implement max_values + storages info

* some formatting + doc

* rename StoragesInfo -> PalletStorageInfo

* merge both StorageInfoTrait and PalletStorageInfo

I think it is more future proof. In the future some storage could make
use of multiple prefix. Like one to store how much value has been
inserted, etc...

* Update frame/support/procedural/src/storage/parse.rs

Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>

* Update frame/support/procedural/src/storage/storage_struct.rs

Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>

* Fix max_size using hasher information

hasher now expose `max_len` which allows to computes their maximum len.
For hasher without concatenation, it is the size of the hash part,
for hasher with concatenation, it is the size of the hash part + max
encoded len of the key.

* fix tests

* fix ui tests

Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
parent 59f34ab8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment