We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem : Trying to fetch values from a StorageDoubleMap by supplying only a partial key, the result still returns all values in storage
Code :
pub async fn calculate_pool_data(pool_id : u32, era: u32) -> Result<(), Box<dyn std::error::Error>> { let relay_client = RelayClient::from_url("wss://rpc.relay.blockchain.enjin.io:443").await?; // get unbonding members let unbonding_members = { let query = relay::storage().nomination_pools().unbonding_members_iter1(6u32); let mut results = relay_client.storage().at_latest().await?.iter(query).await?; let mut unbonding_members = HashMap::new(); while let Some(Ok((key, prefs))) = results.next().await { unbonding_members.insert(key, prefs); } unbonding_members }; println!("Unbonding members {:?}", unbonding_members.len()); Ok(()) }
Output :
Unbonding members 109
Expected Output : 1 (there is only one unbonding member)
The text was updated successfully, but these errors were encountered:
Thankyou for raising this; that is unexpected! We'll look into it!
Sorry, something went wrong.
Reproduce issue #1251
ef273ee
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
I was able to reproduce this issue on the following branch: https://github.com/paritytech/subxt/compare/lexnv/repro-case-1251?expand=1.
Indeed there seems to be a mismatch, most probably due to constructing the query differently.
lexnv
Successfully merging a pull request may close this issue.
Problem :
Trying to fetch values from a StorageDoubleMap by supplying only a partial key, the result still returns all values in storage
Example :
Code :
Output :
Expected Output :
1 (there is only one unbonding member)
The text was updated successfully, but these errors were encountered: