Speed up storage iteration from within the runtime (#13479)

* Speed up storage iteration from within the runtime

* Move the cached iterator into an `Option`

* Use `RefCell` in no_std

* Simplify the code slightly

* Use `Option::replace`

* Update doc comment for `next_storage_key_slow`
This commit is contained in:
Koute
2023-03-01 17:58:18 +09:00
committed by GitHub
parent 20bf3c938e
commit 55263fa2a1
9 changed files with 118 additions and 16 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ pallet-timestamp = { version = "4.0.0-dev", default-features = false, path = "..
sp-consensus-grandpa = { version = "4.0.0-dev", default-features = false, path = "../../primitives/consensus/grandpa" }
sp-trie = { version = "7.0.0", default-features = false, path = "../../primitives/trie" }
sp-transaction-pool = { version = "4.0.0-dev", default-features = false, path = "../../primitives/transaction-pool" }
trie-db = { version = "0.25.1", default-features = false }
trie-db = { version = "0.26.0", default-features = false }
sc-service = { version = "0.10.0-dev", default-features = false, optional = true, features = ["test-helpers"], path = "../../client/service" }
sp-state-machine = { version = "0.13.0", default-features = false, path = "../../primitives/state-machine" }
sp-externalities = { version = "0.13.0", default-features = false, path = "../../primitives/externalities" }