mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-22 13:48:04 +00:00
storage: Fix partial key storage iteration (#1298)
* storage/fix: Use partial key instead of root key for iter Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * storage: Allow partial key construction Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * storage: Allow less provided types than num of hashes Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * storage: Error on more fields than types Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * testing: Check partial key iteration Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * storage: Rename variable wrt partial address bytes Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * storage: Identical storage key to root key if no keys are provided Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
@@ -45,6 +45,9 @@ async fn storage_iter() {
|
||||
let api = ctx.client();
|
||||
|
||||
let addr = node_runtime::storage().system().account_iter();
|
||||
let addr_bytes = api.storage().address_bytes(&addr).unwrap();
|
||||
assert_eq!(addr_bytes, addr.to_root_bytes());
|
||||
|
||||
let len = api
|
||||
.storage()
|
||||
.at_latest()
|
||||
|
||||
Reference in New Issue
Block a user