-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
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
Query At block #76
Query At block #76
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now we have query_storage
with the added block option but also we already had query_storage_at
, sounds like redundancy so we should kill either of the two. I would also suggest accepting a block number instead of a hash since 99% of the time the client will want to provide a number instead of hash and will end up resolving the block to the hash on their own, we should save them that work ;)
remove query_storage_at or query_storageI understand the Lines 395 to 399 in 92398ce
So, I'd leve the both methods given they have different goals. Working on the block number! |
sube/src/lib.rs
Outdated
@@ -405,11 +411,19 @@ pub struct StorageChangeSet { | |||
/// } | |||
/// ``` | |||
pub trait Backend { | |||
async fn query_storage_at( | |||
async fn get_storage_items( | |||
&self, | |||
keys: Vec<String>, | |||
block: Option<String>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should have this only as a number(e.g. u32
) and do resolution internally in the RPC implementations . 99% of the time users want to use a block number instead of a hash. If we were to use a hash we should also accept it as a byte array instead of string since the hex encoding of stuff is very JSON RPC specific.
No description provided.