Refactor parity_listStorageKeys with count parameter optional (#11124)
This commit is contained in:
committed by
Andronik Ordian
parent
79aeb95272
commit
4fd1ec643f
@@ -203,7 +203,7 @@ where
|
||||
Err(errors::light_unimplemented(None))
|
||||
}
|
||||
|
||||
fn list_storage_keys(&self, _: H160, _: u64, _: Option<H256>, _: Option<BlockNumber>) -> Result<Option<Vec<H256>>> {
|
||||
fn list_storage_keys(&self, _: H160, _: Option<u64>, _: Option<H256>, _: Option<BlockNumber>) -> Result<Option<Vec<H256>>> {
|
||||
Err(errors::light_unimplemented(None))
|
||||
}
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@ impl<C, M, U, S> Parity for ParityClient<C, M, U> where
|
||||
.map(|a| a.into_iter().map(Into::into).collect()))
|
||||
}
|
||||
|
||||
fn list_storage_keys(&self, address: H160, count: u64, after: Option<H256>, block_number: Option<BlockNumber>) -> Result<Option<Vec<H256>>> {
|
||||
fn list_storage_keys(&self, address: H160, count: Option<u64>, after: Option<H256>, block_number: Option<BlockNumber>) -> Result<Option<Vec<H256>>> {
|
||||
let number = match block_number.unwrap_or_default() {
|
||||
BlockNumber::Pending => {
|
||||
warn!("BlockNumber::Pending is unsupported");
|
||||
|
||||
@@ -117,7 +117,7 @@ pub trait Parity {
|
||||
/// Returns all storage keys of the given address (first parameter) if Fat DB is enabled (`--fat-db`),
|
||||
/// or null if not.
|
||||
#[rpc(name = "parity_listStorageKeys")]
|
||||
fn list_storage_keys(&self, H160, u64, Option<H256>, Option<BlockNumber>) -> Result<Option<Vec<H256>>>;
|
||||
fn list_storage_keys(&self, H160, Option<u64>, Option<H256>, Option<BlockNumber>) -> Result<Option<Vec<H256>>>;
|
||||
|
||||
/// Encrypt some data with a public key under ECIES.
|
||||
/// First parameter is the 512-byte destination public key, second is the message.
|
||||
|
||||
Reference in New Issue
Block a user